Add quotes to the autostart path

This commit is contained in:
DevilXD committed 2022-03-17 10:29:53 +01:00
1 parent 5a3a540b45
commit 5ba2fbe567
1 file changed
+2 -1
+2 -1
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: