Fix race condition in image cache directory creation

Replace os.mkdir() with os.makedirs(exist_ok=True) in real_pms_image_proxy
to prevent FileExistsError when multiple threads try to create the same
directory simultaneously.

Fixes the following error:
FileExistsError: [Errno 17] File exists: '/config/cache/images'

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Keith Herrington 2025-08-13 23:41:09 -07:00
commit efaf327cc6

View file

@ -4801,7 +4801,7 @@ class WebInterface(object):
ffp = os.path.join(c_dir, fp)
if not os.path.exists(c_dir):
os.mkdir(c_dir)
os.makedirs(c_dir, exist_ok=True)
clip = helpers.bool_true(clip)