File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Flow.Launcher.Core/Plugin Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -550,8 +550,13 @@ private static string GetContainingFolderPathAfterUnzip(string unzippedParentFol
550550 private static bool SameOrLesserPluginVersionExists ( string metadataPath )
551551 {
552552 var newMetadata = JsonSerializer . Deserialize < PluginMetadata > ( File . ReadAllText ( metadataPath ) ) ;
553+
554+ if ( ! Version . TryParse ( newMetadata . Version , out var newVersion ) )
555+ return true ; // If version is not valid, we assume it is lesser than any existing version
556+
553557 return AllPlugins . Any ( x => x . Metadata . ID == newMetadata . ID
554- && newMetadata . Version . CompareTo ( x . Metadata . Version ) <= 0 ) ;
558+ && Version . TryParse ( x . Metadata . Version , out var version )
559+ && newVersion <= version ) ;
555560 }
556561
557562 #region Public functions
You can’t perform that action at this time.
0 commit comments