summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2014-06-03 20:47:41 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2014-06-03 20:47:41 +0000
commit6496e700ab055e170a48047f808312e0611ea1e3 (patch)
tree0b3963a0d5d2bd2e6fdf989d3cfac4be16e3ba80 /plugins/PluginUpdater
parenta4ab8224c5ac160ccedb9f23b8c7eb687bd3a17c (diff)
Fixed error handling
git-svn-id: http://svn.miranda-ng.org/main/trunk@9410 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PluginUpdater')
-rw-r--r--plugins/PluginUpdater/src/Utils.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp
index 6d28fa0258..e628d5540d 100644
--- a/plugins/PluginUpdater/src/Utils.cpp
+++ b/plugins/PluginUpdater/src/Utils.cpp
@@ -219,15 +219,18 @@ bool ParseHashes(const TCHAR *ptszUrl, ptrT& baseUrl, SERVLIST& arHashes)
pFileUrl.CRCsum = 0;
HANDLE nlc;
- BOOL ret = DownloadFile(&pFileUrl, nlc);
+ bool ret = DownloadFile(&pFileUrl, nlc);
Netlib_CloseHandle(nlc);
- if (!ret && !opts.bSilent) {
- ShowPopup(0, LPGENT("Plugin Updater"), LPGENT("An error occurred while checking new updates."), 1, 0);
+ if (!ret) {
+ if(!opts.bSilent)
+ ShowPopup(0, LPGENT("Plugin Updater"), LPGENT("An error occurred while checking new updates."), 1, 0);
return false;
}
- unzip(pFileUrl.tszDiskPath, tszTempPath, NULL,true);
+ if(!unzip(pFileUrl.tszDiskPath, tszTempPath, NULL,true))
+ return false;
+
DeleteFile(pFileUrl.tszDiskPath);
TCHAR tszTmpIni[MAX_PATH] = {0};