Add quotes to the autostart path

This commit is contained in:
DevilXD
2022-03-17 10:29:53 +01:00
parent 5a3a540b45
commit 5ba2fbe567

3
gui.py
View File

@@ -1101,7 +1101,8 @@ class SettingsPanel:
self._settings.autostart = enabled
self._settings.autostart_tray = tray
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:
self_path += " --tray"
with RegistryKey("HKCU/Software/Microsoft/Windows/CurrentVersion/Run") as key: