diff options
author | Daniel Molkentin <danimo@owncloud.com> | 2014-02-03 16:44:14 +0400 |
---|---|---|
committer | Daniel Molkentin <danimo@owncloud.com> | 2014-02-03 16:46:20 +0400 |
commit | 19e7c4f66f92f565b4ef62a06e0fef062d88cb64 (patch) | |
tree | 8d9a0fb6a5a40aab384865589aee4a3c0d0eba81 /src/updater | |
parent | cf7b77e2bf548eaeb5e88152b4bbb0652c932195 (diff) |
NSISUpdater: Fix logic to invoke updater on non-explicit start
Diffstat (limited to 'src/updater')
-rw-r--r-- | src/updater/ocupdater.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/updater/ocupdater.cpp b/src/updater/ocupdater.cpp index 6fc424840..36cb64731 100644 --- a/src/updater/ocupdater.cpp +++ b/src/updater/ocupdater.cpp @@ -333,7 +333,7 @@ NSISUpdater::UpdateState NSISUpdater::updateStateOnStart() // has the previous run downloaded an update? if (!updateFileName.isEmpty() && QFile(updateFileName).exists()) { // did it try to execute the update? - if (settings.value(autoUpdateAttemptedC).toBool()) { + if (settings.value(autoUpdateAttemptedC, false).toBool()) { // clean up settings.remove(autoUpdateAttemptedC); settings.remove(updateAvailableC); @@ -351,13 +351,13 @@ NSISUpdater::UpdateState NSISUpdater::updateStateOnStart() settings.remove(updateTargetVersionC); return UpdateFailed; } - } - } else { - if (!settings.contains(autoUpdateFailedVersionC)) { - return UpdateAvailable; + } else { + if (!settings.contains(autoUpdateFailedVersionC)) { + return UpdateAvailable; + } } } - return NoUpdate; + return NoUpdate; } bool NSISUpdater::handleStartup() |