From 5ba2fbe56742cb2e0a554d98dda4f7e7b6de7bbd Mon Sep 17 00:00:00 2001 From: DevilXD Date: Thu, 17 Mar 2022 10:29:53 +0100 Subject: [PATCH] Add quotes to the autostart path --- gui.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gui.py b/gui.py index c836b03..dd20ac2 100644 --- a/gui.py +++ b/gui.py @@ -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: