Merge pull request #1401 from ynput/bugfix/workdir-creation

Workfiles: Make sure workdir exists
This commit is contained in:
Jakub Trllo 2025-08-01 18:34:30 +02:00 committed by GitHub
commit 861cce40ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -944,6 +944,8 @@ class IWorkfileHost:
self._emit_workfile_save_event(event_data, after_save=False)
workdir = os.path.dirname(filepath)
if not os.path.exists(workdir):
os.makedirs(workdir, exist_ok=True)
# Set 'AYON_WORKDIR' environment variable
os.environ["AYON_WORKDIR"] = workdir