Don't enter settings after update

This commit is contained in:
Ilya Fedin 2023-10-03 20:26:24 +04:00 committed by John Preston
parent ef2a0bb05e
commit f881192dd0
2 changed files with 9 additions and 2 deletions

View File

@ -43,6 +43,9 @@ bool Launcher::launchUpdater(UpdaterLaunch action) {
}
const auto justRelaunch = action == UpdaterLaunch::JustRelaunch;
if (action == UpdaterLaunch::PerformUpdate) {
_updating = true;
}
std::vector<std::string> argumentsList;
@ -82,8 +85,10 @@ bool Launcher::launchUpdater(UpdaterLaunch action) {
argumentsList.push_back("-key");
argumentsList.push_back(cDataFile().toStdString());
}
argumentsList.push_back("-noupdate");
argumentsList.push_back("-tosettings");
if (!_updating) {
argumentsList.push_back("-noupdate");
argumentsList.push_back("-tosettings");
}
if (customWorkingDir()) {
argumentsList.push_back("-workdir");
argumentsList.push_back(cWorkingDir().toStdString());

View File

@ -21,6 +21,8 @@ private:
void initHook() override;
bool launchUpdater(UpdaterLaunch action) override;
bool _updating = false;
};
} // namespace Platform