Make sure workdir exists when workfile is being saved

This commit is contained in:
Jakub Trllo 2025-08-01 18:23:15 +02:00
parent 745a394cdd
commit 8bcc4a3939

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