Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions src/gui/updater/sparkleupdater_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,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;
Expand All @@ -289,13 +290,25 @@ - (NSString *)feedURLStringForUpdater:(SPUUpdater *)updater

void SparkleUpdater::backgroundCheckForUpdate()
{
if (!autoUpdaterAllowed()) {
qCInfo(OCC::lcUpdater) << "not launching background check, auto updater not allowed";
return;
}

const ConfigFile config;
if (autoUpdaterAllowed() && config.autoUpdateCheck()) {
qCInfo(OCC::lcUpdater) << "launching background check";
[_interface->updaterController.updater checkForUpdatesInBackground];
} else {
qCInfo(OCC::lcUpdater) << "not launching background check, auto updater not allowed or update check skipped in 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
Expand Down
Loading