From 5fbca26fe611dc8426ca73deddbbc2bc8c362da7 Mon Sep 17 00:00:00 2001 From: "lane.wei" Date: Wed, 8 Nov 2023 14:47:38 +0800 Subject: [PATCH] ENH: updater: use the current plugin version for compare JIRA: no jira Change-Id: I15d29b55eb886e8f28f94e9fb1ba5508824dd674 --- src/slic3r/Utils/PresetUpdater.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/slic3r/Utils/PresetUpdater.cpp b/src/slic3r/Utils/PresetUpdater.cpp index 9c1e44ae9..d992312de 100644 --- a/src/slic3r/Utils/PresetUpdater.cpp +++ b/src/slic3r/Utils/PresetUpdater.cpp @@ -954,10 +954,12 @@ void PresetUpdater::priv::sync_plugins(std::string http_url, std::string plugin_ bool need_delete_cache = false; Semver current_semver = curr_version; Semver cached_semver = cached_version; + Semver current_plugin_semver = plugin_version; int curent_patch_cc = current_semver.patch()/100; int cached_patch_cc = cached_semver.patch()/100; int curent_patch_dd = current_semver.patch()%100; + int curent_plugin_patch_dd = current_plugin_semver.patch()%100; int cached_patch_dd = cached_semver.patch()%100; if ((cached_semver.maj() != current_semver.maj()) || (cached_semver.min() != current_semver.min()) @@ -966,7 +968,7 @@ void PresetUpdater::priv::sync_plugins(std::string http_url, std::string plugin_ need_delete_cache = true; BOOST_LOG_TRIVIAL(info) << boost::format("cached plugins version %1% not match with current %2%")%cached_version%curr_version; } - else if (cached_patch_dd <= curent_patch_dd) { + else if (cached_patch_dd <= curent_plugin_patch_dd) { need_delete_cache = true; BOOST_LOG_TRIVIAL(info) << boost::format("cached plugins version %1% not newer than current %2%")%cached_version%curr_version; }