From c2caa3d22a12cccc8f357e280e1883d215a8eb3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=AD=20Climent?= Date: Tue, 4 Feb 2025 12:18:15 +0100 Subject: [PATCH] Fixed an issue where packages with multiple versions installed would always dowload the icon again --- src/UniGetUI.Core.IconStore/IconCacheEngine.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/UniGetUI.Core.IconStore/IconCacheEngine.cs b/src/UniGetUI.Core.IconStore/IconCacheEngine.cs index 8e6cd79a9..45d9f5e3e 100644 --- a/src/UniGetUI.Core.IconStore/IconCacheEngine.cs +++ b/src/UniGetUI.Core.IconStore/IconCacheEngine.cs @@ -4,6 +4,7 @@ using UniGetUI.Core.Classes; using UniGetUI.Core.Data; using UniGetUI.Core.Logging; +using UniGetUI.Core.Tools; namespace UniGetUI.Core.IconEngine { @@ -317,7 +318,7 @@ private static bool ValidateByVersion(CacheableIcon icon, string versionPath) { try { - return File.Exists(versionPath) && File.ReadAllText(versionPath) == icon.Version; + return File.Exists(versionPath) && CoreTools.GetVersionStringAsFloat(File.ReadAllText(versionPath)) >= CoreTools.GetVersionStringAsFloat(icon.Version); } catch (Exception e) {