Release KSwitcher v0.6.73 with autostart path repair

This commit is contained in:
agrynco committed 2026-11-13 10:28:41 +02:00
1 parent 3117b2d9c8
commit 3bcbfeee15
13 files changed
+265 -63

No files matched your search

+12 -1
View File
@@ -15,13 +15,24 @@ bool shouldElevateOnLaunch()
try
{
auto settings = ks::loadSettings(ks::dataDirectory() / L"settings.json", {});
return settings.autostart && settings.elevatedAutostart;
if (!settings.autostart || !settings.elevatedAutostart)
return false;
}
catch (const std::exception &)
{
// The normal startup path handles unreadable settings and reports them.
return false;
}
try
{
// Let the resident explain the stale path before asking to elevate the repair.
return ks::staleAutostartPath(true).empty();
}
catch (const std::exception &)
{
// The elevated resident can retry reading the task.
return true;
}
}
}