Skip to content

Commit 988a3bc

Browse files
committed
Do not throw exception & Fix blank lines
1 parent 770eec5 commit 988a3bc

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+
553554
if (!Version.TryParse(newMetadata.Version, out var newVersion))
554-
throw new InvalidOperationException($"A plugin with the same ID and version already exists, or the version is greater than this downloaded plugin {plugin.Name}");
555+
return true; // If version is not valid, we assume it is lesser than any existing version
555556

556557
return AllPlugins.Any(x => x.Metadata.ID == newMetadata.ID
557558
&& Version.TryParse(x.Metadata.Version, out var version)

0 commit comments

Comments
 (0)