Browse Source

Encapsulate Python executable and args in double quotes (#621)

If a paths contain spaces, the execv needs quotation marks to not implicitly split those paths into multiple arguments

Co-authored-by: DukeSniper <>
pull/623/head
DukeSniper 7 months ago committed by GitHub
parent
commit
853f85987e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      glob/manager_server.py

5
glob/manager_server.py

@ -1081,7 +1081,10 @@ def restart(self):
exit(0)
print(f"\nRestarting... [Legacy Mode]\n\n")
return os.execv(sys.executable, [sys.executable] + sys.argv)
if sys.platform.startswith('win32'):
return os.execv(sys.executable, ['"' + sys.executable + '"', '"' + sys.argv[0] + '"'] + sys.argv[1:])
else:
return os.execv(sys.executable, [sys.executable] + sys.argv)
def sanitize_filename(input_string):

Loading…
Cancel
Save