Skip to content

Commit 24b87aa

Browse files
author
Peter de Vroom
committed
Use System.Version to compare versions
1 parent 4fcc12d commit 24b87aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Flow.Launcher.Core/Plugin/PluginManager.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,8 +550,9 @@ private static string GetContainingFolderPathAfterUnzip(string unzippedParentFol
550550
private static bool SameOrLesserPluginVersionExists(string metadataPath)
551551
{
552552
var newMetadata = JsonSerializer.Deserialize<PluginMetadata>(File.ReadAllText(metadataPath));
553+
var newVersion = new Version(newMetadata.Version);
553554
return AllPlugins.Any(x => x.Metadata.ID == newMetadata.ID
554-
&& newMetadata.Version.CompareTo(x.Metadata.Version) <= 0);
555+
&& newVersion <= (new Version(x.Metadata.Version)));
555556
}
556557

557558
#region Public functions

0 commit comments

Comments
 (0)