Windows EXE: Fix CommandNotFoundException
Fixes CommandNotFoundException that occured when started from within a directory whose name contains a space.
This commit is contained in:
parent
e232c82d5e
commit
f0e66ef465
@ -17,7 +17,7 @@ import subprocess
|
||||
def __main():
|
||||
with contextlib.suppress(AttributeError, psutil.Error):
|
||||
if psutil.Process().parent().parent().name() == "explorer.exe":
|
||||
subprocess.Popen("powershell -NoExit -Command \\\"& {0}\\\"".format(sys.argv[0]))
|
||||
subprocess.Popen("powershell -NoExit -Command \\\"& '{0}'\\\"".format(sys.argv[0]))
|
||||
return
|
||||
main()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user