Fixed bug in linux version for downloading the first plugin only whatever the plugin name was

This commit is contained in:
2023-12-17 16:44:52 +02:00
parent 2280957ea9
commit fe32ebc4d7
2 changed files with 10 additions and 7 deletions

View File

@@ -148,12 +148,14 @@ public class PluginsManager
}
else if (Functions.GetOperatingSystem() == OperatingSystem.LINUX && contents[4].Contains("Linux"))
{
if (contents.Length == 6)
return new[] { contents[2], contents[3], contents[5] };
if (contents.Length == 5)
return new[] { contents[2], contents[3], string.Empty };
throw new Exception("Failed to download plugin. Invalid Argument Length");
if (contents[0].ToLowerInvariant() == name.ToLowerInvariant())
{
if (contents.Length == 6)
return new[] { contents[2], contents[3], contents[5] };
if (contents.Length == 5)
return new[] { contents[2], contents[3], string.Empty };
throw new Exception("Failed to download plugin. Invalid Argument Length");
}
}
}
}