mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
pr comments
This commit is contained in:
parent
e10859d322
commit
b2ed65c17a
1 changed files with 10 additions and 1 deletions
|
|
@ -649,12 +649,21 @@ def get_instance_staging_dir(instance):
|
|||
custom_temp_dir = None
|
||||
if openpype_temp_dir:
|
||||
if "{" in openpype_temp_dir:
|
||||
# path is anatomy template
|
||||
custom_temp_dir = _format_staging_dir(
|
||||
instance, openpype_temp_dir
|
||||
)
|
||||
elif os.path.exists(openpype_temp_dir):
|
||||
else:
|
||||
# path is absolute
|
||||
custom_temp_dir = openpype_temp_dir
|
||||
|
||||
if not os.path.exists(custom_temp_dir):
|
||||
try:
|
||||
# create it if it doesnt exists
|
||||
os.makedirs(custom_temp_dir)
|
||||
except IOError as error:
|
||||
raise IOError("Path couldn't be created: {}".format(error))
|
||||
|
||||
if custom_temp_dir:
|
||||
staging_dir = os.path.normpath(
|
||||
tempfile.mkdtemp(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue