summaryrefslogtreecommitdiff
path: root/src/update/UpdateActivity.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-08-18 11:44:07 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-08-18 11:44:07 (GMT)
commit97a819c79c5d89eca3a3227c88efe6b2c9e99b77 (patch)
tree8aa9772a5ef60afc12ee36192590e4d9da97acd2 /src/update/UpdateActivity.cpp
parent5b51e670447ea175fb9b0b7035403b274e16972e (diff)
downloadpowder-97a819c79c5d89eca3a3227c88efe6b2c9e99b77.zip
powder-97a819c79c5d89eca3a3227c88efe6b2c9e99b77.tar.gz
Fix autoupdate issue where temp file is not deleted, fixes #128
Diffstat (limited to 'src/update/UpdateActivity.cpp')
-rw-r--r--src/update/UpdateActivity.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/update/UpdateActivity.cpp b/src/update/UpdateActivity.cpp
index 1f07373..0f22df7 100644
--- a/src/update/UpdateActivity.cpp
+++ b/src/update/UpdateActivity.cpp
@@ -105,13 +105,16 @@ private:
notifyStatus("Applying update");
notifyProgress(-1);
+ Client::Ref().SetPref("version.update", true);
+ Client::Ref().WritePrefs();
if (update_start(res, uncompressedLength))
{
+ Client::Ref().SetPref("version.update", false);
update_cleanup();
notifyError("Update failed - try downloading a new version.");
+ return false;
}
- Client::Ref().SetPref("version.update", true);
return true;
corrupt: