1
0
Fork 0
mirror of synced 2024-06-17 18:14:44 +12:00

Quote executable path for Windows

This commit is contained in:
Stelios Tsampas 2022-09-07 19:19:14 +03:00
parent 5029921b09
commit 6a2af0be7c

View file

@ -284,10 +284,9 @@ def create_desktop_link(app_name=None, core: LegendaryCore = None, type_of_link=
if not for_rare:
arguments.extend(["launch", app_name])
shortcut.Targetpath = executable
shortcut.Arguments = shlex.join(arguments)
# Maybe there is a better solution, but windows does not accept single quotes (Windows is weird)
shortcut.Arguments = shortcut.Arguments.replace("'", '"')
shortcut.Targetpath = shlex.quote(executable).replace("'", '"')
shortcut.Arguments = shlex.join(arguments).replace("'", '"')
if for_rare:
shortcut.WorkingDirectory = QStandardPaths.writableLocation(QStandardPaths.HomeLocation)