Minor simplification of the autostart detection logic
This commit is contained in:
1 parent
07baba3935
commit
db862cfdc0
1 file changed
+5
-7
@@ -1714,13 +1714,11 @@ class SettingsPanel:
|
|||||||
value_type, value = key.get(self.AUTOSTART_NAME)
|
value_type, value = key.get(self.AUTOSTART_NAME)
|
||||||
except ValueNotFound:
|
except ValueNotFound:
|
||||||
return False
|
return False
|
||||||
if (
|
# TODO: Consider deleting the old value to avoid autostart errors
|
||||||
value_type is not ValueType.REG_SZ
|
return (
|
||||||
or self._get_self_path() not in value
|
value_type is ValueType.REG_SZ
|
||||||
):
|
and self._get_self_path() in value
|
||||||
# TODO: Consider deleting the old value to avoid autostart errors
|
)
|
||||||
return False
|
|
||||||
return True
|
|
||||||
elif sys.platform == "linux":
|
elif sys.platform == "linux":
|
||||||
autostart_file: Path = self._get_linux_autostart_filepath()
|
autostart_file: Path = self._get_linux_autostart_filepath()
|
||||||
if not autostart_file.exists():
|
if not autostart_file.exists():
|
||||||
|
|||||||
Reference in new issue
Block a user