summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater/src
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-01-18 11:58:08 +0000
committerRobert Pösel <robyer@seznam.cz>2014-01-18 11:58:08 +0000
commitd4bff57e724e532ef2382137c0c4f6fd59f1a9b3 (patch)
tree348ec59756cb996420ebe5f6ef6d1198bfe5882d /plugins/PluginUpdater/src
parent27fcf925e0144acc7f7dc619dbf3dae82f886081 (diff)
Plugin updater: Interrupt updating when some download fails; Version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@7715 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PluginUpdater/src')
-rw-r--r--plugins/PluginUpdater/src/DlgUpdate.cpp14
-rw-r--r--plugins/PluginUpdater/src/Version.h2
2 files changed, 11 insertions, 5 deletions
diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp
index 059dcaf552..4448dda157 100644
--- a/plugins/PluginUpdater/src/DlgUpdate.cpp
+++ b/plugins/PluginUpdater/src/DlgUpdate.cpp
@@ -62,7 +62,8 @@ static void ApplyUpdates(void *param)
mir_sntprintf(tszFileTemp, SIZEOF(tszFileTemp), _T("%s\\Temp"), tszRoot);
SafeCreateDirectory(tszFileTemp);
- HANDLE nlc = NULL;
+ bool error = false;
+ HANDLE nlc = NULL;
for (int i=0; i < todo.getCount(); ++i) {
ListView_EnsureVisible(hwndList, i, FALSE);
if ( !todo[i].bEnabled) {
@@ -78,14 +79,19 @@ static void ApplyUpdates(void *param)
SetStringText(hwndList, i, TranslateT("Downloading..."));
FILEURL *pFileUrl = &todo[i].File;
- if ( !DownloadFile(pFileUrl->tszDownloadURL, pFileUrl->tszDiskPath, pFileUrl->CRCsum, nlc))
+ if (!DownloadFile(pFileUrl->tszDownloadURL, pFileUrl->tszDiskPath, pFileUrl->CRCsum, nlc)) {
SetStringText(hwndList, i, TranslateT("Failed!"));
- else
+
+ // interrupt update as we require all components to be updated
+ MessageBox(hDlg, TranslateT("Update failed! Some component wasn't downloaded correctly. Try it again later."), TranslateT("Plugin Updater"), MB_OK | MB_ICONERROR);
+ error = true;
+ break;
+ } else
SetStringText(hwndList, i, TranslateT("Succeeded."));
}
Netlib_CloseHandle(nlc);
- if (todo.getCount() > 0) {
+ if (!error && todo.getCount() > 0) {
TCHAR *tszMirandaPath = Utils_ReplaceVarsT(_T("%miranda_path%"));
for (int i = 0; i < todo.getCount(); i++) {
diff --git a/plugins/PluginUpdater/src/Version.h b/plugins/PluginUpdater/src/Version.h
index 89d54f2420..2725439873 100644
--- a/plugins/PluginUpdater/src/Version.h
+++ b/plugins/PluginUpdater/src/Version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 1
#define __RELEASE_NUM 1
-#define __BUILD_NUM 6
+#define __BUILD_NUM 7
#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM