summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2025-02-22 14:28:53 +0200
committerGeorge Hazan <george.hazan@gmail.com>2025-02-22 14:28:53 +0200
commitb8cff0aaaabe04a00756e01831f9ecdb9b61ae59 (patch)
tree06598687f01a4ea28577ab584e4f36110a7b0843
parent12d1b107b86008bd079a1f40a9c285c24de6a3b5 (diff)
fixes #4883 (PluginUpdater устанавливает не все компоненты)
-rw-r--r--plugins/PluginUpdater/src/DlgListNew.cpp27
-rw-r--r--plugins/PluginUpdater/src/version.h2
2 files changed, 20 insertions, 9 deletions
diff --git a/plugins/PluginUpdater/src/DlgListNew.cpp b/plugins/PluginUpdater/src/DlgListNew.cpp
index 2ac37ce98d..7a15dd5a34 100644
--- a/plugins/PluginUpdater/src/DlgListNew.cpp
+++ b/plugins/PluginUpdater/src/DlgListNew.cpp
@@ -294,6 +294,17 @@ public:
FillList();
}
+ bool DownloadUpdate(FILEINFO *p, HNETLIBCONN nlc, TFileName wszBackupFolder)
+ {
+ if (DownloadFile(&p->File, nlc) != ERROR_SUCCESS)
+ return false;
+
+ if (!unzip(p->File.wszDiskPath, g_mirandaPath, wszBackupFolder, false))
+ PU::SafeDeleteFile(p->File.wszDiskPath); // remove .zip after successful update
+ db_unset(0, DB_MODULE_NEW_FILES, _T2A(p->wszOldName));
+ return true;
+ }
+
void Unpack()
{
// create needed folders after escalating priviledges. Folders creates when we actually install updates
@@ -303,21 +314,21 @@ public:
HNETLIBCONN nlc = nullptr;
int i = 0;
for (auto &p : *todo) {
- if (p->IsFiltered(m_wszFilter))
+ if (p->IsFiltered(m_wszFilter)) {
+ // this update is hidden from screen, so we do not update anything
+ if (p->bEnabled)
+ DownloadUpdate(p, nlc, wszBackupFolder);
continue;
+ }
m_list.EnsureVisible(i, FALSE);
if (p->bEnabled) {
// download update
m_list.SetItemText(i, 1, TranslateT("Downloading..."));
-
- if (DownloadFile(&p->File, nlc) == ERROR_SUCCESS) {
+ if (DownloadUpdate(p, nlc, wszBackupFolder))
m_list.SetItemText(i, 1, TranslateT("Succeeded."));
- if (!unzip(p->File.wszDiskPath, g_mirandaPath, wszBackupFolder, false))
- PU::SafeDeleteFile(p->File.wszDiskPath); // remove .zip after successful update
- db_unset(0, DB_MODULE_NEW_FILES, _T2A(p->wszOldName));
- }
- else m_list.SetItemText(i, 1, TranslateT("Failed!"));
+ else
+ m_list.SetItemText(i, 1, TranslateT("Failed!"));
}
else m_list.SetItemText(i, 1, TranslateT("Skipped."));
i++;
diff --git a/plugins/PluginUpdater/src/version.h b/plugins/PluginUpdater/src/version.h
index f1a433408d..dde05d4a1f 100644
--- a/plugins/PluginUpdater/src/version.h
+++ b/plugins/PluginUpdater/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 2
#define __RELEASE_NUM 1
-#define __BUILD_NUM 7
+#define __BUILD_NUM 8
#include <stdver.h>