From ca075a2786664d1cf635ea04236237fd95e46607 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 9 Jun 2024 16:28:15 +0300 Subject: =?UTF-8?q?fixes=20#4460=20(PluginUpdater=20=D0=BF=D1=8B=D1=82?= =?UTF-8?q?=D0=B0=D0=B5=D1=82=D1=81=D1=8F=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D0=B8=D1=82=D1=8C=20=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20=D1=81=D0=BD=D0=BE=D0=B2=D0=B0=20?= =?UTF-8?q?=D0=B8=20=D1=81=D0=BD=D0=BE=D0=B2=D0=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/PluginUpdater/src/DlgUpdate.cpp | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'plugins/PluginUpdater/src/DlgUpdate.cpp') diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp index ba31e29480..a9ab7fd60b 100644 --- a/plugins/PluginUpdater/src/DlgUpdate.cpp +++ b/plugins/PluginUpdater/src/DlgUpdate.cpp @@ -786,19 +786,21 @@ static void CheckUpdates(void *) SERVLIST hashes(50, CompareHashes); bool success = ParseHashes(updateUrl, baseUrl, hashes); if (success) { - FILELIST *UpdateFiles = new FILELIST(20); - int count = ScanFolder(g_mirandaPath, mir_wstrlen(g_mirandaPath) + 1, baseUrl, hashes, UpdateFiles); - if (count == 0) { - if (!g_plugin.bSilent) - ShowPopup(TranslateT("Plugin Updater"), TranslateT("No updates found."), POPUP_TYPE_INFO); - delete UpdateFiles; - } - else { - // Show dialog - if (g_plugin.bSilentMode && g_plugin.bSilent) - mir_forkthread(DlgUpdateSilent, UpdateFiles); - else - CallFunctionAsync(LaunchDialog, UpdateFiles); + if (hashes.getCount()) { + FILELIST *UpdateFiles = new FILELIST(20); + int count = ScanFolder(g_mirandaPath, mir_wstrlen(g_mirandaPath) + 1, baseUrl, hashes, UpdateFiles); + if (count == 0) { + if (!g_plugin.bSilent) + ShowPopup(TranslateT("Plugin Updater"), TranslateT("No updates found."), POPUP_TYPE_INFO); + delete UpdateFiles; + } + else { + // Show dialog + if (g_plugin.bSilentMode && g_plugin.bSilent) + mir_forkthread(DlgUpdateSilent, UpdateFiles); + else + CallFunctionAsync(LaunchDialog, UpdateFiles); + } } // reset timer to next update -- cgit v1.2.3