Skip to content

Commit e304412

Browse files
committed
Squashed commit of the following:
commit 8f0af72 Author: Stephane Deverly <[email protected]> Date: Tue Jul 16 13:33:32 2024 +0200 For #14333, polish commit 1fae537 Author: Stephane Deverly <[email protected]> Date: Tue Jul 16 12:36:07 2024 +0200 For #14333, blind fix.
1 parent 786bfe0 commit e304412

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

hooks/tk-multi-publish2/tk-maya/basic/publish_turntable.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,15 @@ def publish(self, settings, item):
994994
# "." e.g. firstname.name and makes UE crashes
995995
base_temp_dir = None
996996
if sys.platform == "win32":
997-
base_temp_dir = r"C:\Temp"
997+
if os.path.isdir(r"C:\Temp"):
998+
base_temp_dir = r"C:\Temp"
999+
elif os.path.isdir(r"C:\Windows\Temp"):
1000+
base_temp_dir = r"C:\Windows\Temp"
1001+
else:
1002+
self.logger.warning(
1003+
"Couldn't retrieve a temp base directory without "
1004+
"the user name in it, using standard TEMP base"
1005+
)
9981006
temp_folder = tempfile.mkdtemp(suffix="temp_unreal_shotgun", dir=base_temp_dir)
9991007
# Store the temp folder path on the item for cleanup in finalize
10001008
item.local_properties["temp_folder"] = temp_folder

0 commit comments

Comments
 (0)