diff --git a/src/gui/updater/sparkleupdater_mac.mm b/src/gui/updater/sparkleupdater_mac.mm index 4dcf33e7f43bd..50cec1e721d2b 100644 --- a/src/gui/updater/sparkleupdater_mac.mm +++ b/src/gui/updater/sparkleupdater_mac.mm @@ -265,6 +265,7 @@ - (NSString *)feedURLStringForUpdater:(SPUUpdater *)updater // See https://github.com/owncloud/client/issues/2931 NSString *bundlePath = [[NSBundle mainBundle] bundlePath]; NSString *expectedPath = [NSString stringWithFormat:@"/Applications/%@", [bundlePath lastPathComponent]]; + if (![expectedPath isEqualTo:bundlePath]) { qCWarning(lcUpdater) << "We are not in /Applications, won't check for update!"; return false; @@ -294,6 +295,21 @@ - (NSString *)feedURLStringForUpdater:(SPUUpdater *)updater } else { qCInfo(OCC::lcUpdater) << "not launching background check, auto updater not allowed or update check skipped in config"; } + + const ConfigFile config; + + if (!config.autoUpdateCheck()) { + qCInfo(OCC::lcUpdater) << "not launching background check, update check skipped in config"; + return; + } + + if (!_interface->updaterController.updater.automaticallyChecksForUpdates) { + qCInfo(OCC::lcUpdater) << "not launching background check, automaticallyChecksForUpdates is disabled"; + return; + } + + qCInfo(OCC::lcUpdater) << "launching background check"; + [_interface->updaterController.updater checkForUpdatesInBackground]; } QString SparkleUpdater::statusString() const