Add quotes to the autostart path
This commit is contained in:
1 parent
5a3a540b45
commit
5ba2fbe567
1 file changed
+2
-1
@@ -1101,7 +1101,8 @@ class SettingsPanel:
|
|||||||
self._settings.autostart = enabled
|
self._settings.autostart = enabled
|
||||||
self._settings.autostart_tray = tray
|
self._settings.autostart_tray = tray
|
||||||
if enabled:
|
if enabled:
|
||||||
self_path = str(Path(sys.argv[0]).resolve())
|
# NOTE: we need double quotes in case the path contains spaces
|
||||||
|
self_path = f'"{Path(sys.argv[0]).resolve()!s}"'
|
||||||
if tray:
|
if tray:
|
||||||
self_path += " --tray"
|
self_path += " --tray"
|
||||||
with RegistryKey("HKCU/Software/Microsoft/Windows/CurrentVersion/Run") as key:
|
with RegistryKey("HKCU/Software/Microsoft/Windows/CurrentVersion/Run") as key:
|
||||||
|
|||||||
Reference in new issue
Block a user