Skip to content

Commit ea179e5

Browse files
committed
shorten version compare logic
1 parent 2edc345 commit ea179e5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Plugins/Flow.Launcher.Plugin.PluginsManager/PluginsManager.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,8 +555,7 @@ private bool SameOrLesserPluginVersionExists(string metadataPath)
555555
var newMetadata = JsonSerializer.Deserialize<PluginMetadata>(File.ReadAllText(metadataPath));
556556
return Context.API.GetAllPlugins()
557557
.Any(x => x.Metadata.ID == newMetadata.ID
558-
&& (x.Metadata.Version == newMetadata.Version
559-
|| newMetadata.Version.CompareTo(x.Metadata.Version) < 0));
558+
&& newMetadata.Version.CompareTo(x.Metadata.Version) <= 0);
560559
}
561560
}
562561
}

0 commit comments

Comments
 (0)