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

@@ -38,7 +38,8 @@ public class Plugin: ICommandAction
#if !DEBUG
new PluginsManager();
#else
new PluginsManager("tests");
// new PluginsManager("tests");
new PluginsManager();
#endif
switch (args[0])

View File

@@ -147,13 +147,15 @@ public class PluginsManager
}
}
else if (Functions.GetOperatingSystem() == OperatingSystem.LINUX && contents[4].Contains("Linux"))
{
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");
}
}
}
}