From 9c9f1e9e2096a7cb81ae091d37ec07d56938395e Mon Sep 17 00:00:00 2001 From: Jyrki Gadinger Date: Mon, 10 Feb 2025 16:03:56 +0100 Subject: [PATCH] skip attempt to install updates at launch when update checks are disabled Signed-off-by: Jyrki Gadinger --- src/gui/updater/ocupdater.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gui/updater/ocupdater.cpp b/src/gui/updater/ocupdater.cpp index b5f6ad49d..5ea608130 100644 --- a/src/gui/updater/ocupdater.cpp +++ b/src/gui/updater/ocupdater.cpp @@ -496,6 +496,13 @@ bool NSISUpdater::handleStartup() { ConfigFile cfg; QSettings settings(cfg.configFile(), QSettings::IniFormat); + + // no need to try to install a previously fetched update when the user doesn't want automated updates + if (cfg.skipUpdateCheck() || !cfg.autoUpdateCheck()) { + qCInfo(lcUpdater) << "Skipping installation of update due to config settings"; + return false; + } + QString updateFileName = settings.value(updateAvailableC).toString(); // has the previous run downloaded an update? if (!updateFileName.isEmpty() && QFile(updateFileName).exists()) { -- 2.30.2