AutoUpdate: Only set triggered flag if process creation succeeds

Don't set `s_update_triggered` if the updater process fails to be
created. This will allow users in that situation to try to start an
update later without having to restart Dolphin first.
This commit is contained in:
Dentomologist
2026-03-31 12:44:47 -07:00
parent f86bbc3b1d
commit 68ac3d651d
+5 -1
View File
@@ -278,7 +278,6 @@ void AutoUpdateChecker::TriggerUpdate(const AutoUpdateChecker::NewVersionInforma
return; return;
} }
s_update_triggered = true;
#ifdef OS_SUPPORTS_UPDATER #ifdef OS_SUPPORTS_UPDATER
std::map<std::string, std::string> updater_flags; std::map<std::string, std::string> updater_flags;
updater_flags["this-manifest-url"] = info.this_manifest_url; updater_flags["this-manifest-url"] = info.this_manifest_url;
@@ -319,6 +318,7 @@ void AutoUpdateChecker::TriggerUpdate(const AutoUpdateChecker::NewVersionInforma
{ {
CloseHandle(pinfo.hThread); CloseHandle(pinfo.hThread);
CloseHandle(pinfo.hProcess); CloseHandle(pinfo.hProcess);
s_update_triggered = true;
} }
else else
{ {
@@ -331,6 +331,10 @@ void AutoUpdateChecker::TriggerUpdate(const AutoUpdateChecker::NewVersionInforma
const std::string error = Common::LastStrerrorString(); const std::string error = Common::LastStrerrorString();
CriticalAlertFmtT("Could not start updater process: {0}", error); CriticalAlertFmtT("Could not start updater process: {0}", error);
} }
else
{
s_update_triggered = true;
}
#endif #endif
#endif #endif