mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Fix proper escaping for executable - Photoshop
Plus escaping of workfile path
This commit is contained in:
parent
523ec644fe
commit
e91efcb8a3
1 changed files with 9 additions and 2 deletions
|
|
@ -20,13 +20,20 @@ class PhotoshopPrelaunchHook(PreLaunchHook):
|
|||
while self.launch_context.launch_args:
|
||||
remainders.append(self.launch_context.launch_args.pop(0))
|
||||
|
||||
workfile_path = self.data["last_workfile_path"]
|
||||
if not os.path.exists(workfile_path):
|
||||
workfile_path = ""
|
||||
|
||||
new_launch_args = [
|
||||
self.python_executable(),
|
||||
"-c",
|
||||
(
|
||||
"import avalon.photoshop;"
|
||||
"avalon.photoshop.launch(\"{}\")"
|
||||
).format(photoshop_executable)
|
||||
"avalon.photoshop.launch(\"{}\", \"{}\")"
|
||||
).format(
|
||||
photoshop_executable.replace("\\", "\\\\"),
|
||||
workfile_path.replace("\\", "\\\\")
|
||||
)
|
||||
]
|
||||
|
||||
# Append as whole list as these areguments should not be separated
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue