diff options
-rw-r--r-- | plugins/PluginUpdater/src/DlgUpdate.cpp | 14 | ||||
-rw-r--r-- | plugins/PluginUpdater/src/Version.h | 2 |
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
|