Updated plugin installation
This commit is contained in:
@@ -192,7 +192,7 @@ internal static class PluginMethods
|
||||
await Parallel.ForEachAsync(downloadTasks, options, async (tuple, token) =>
|
||||
{
|
||||
tuple.Item1.IsIndeterminate = false;
|
||||
string downloadLocation = Application.CurrentApplication.PluginManager.GenerateDependencyLocation(pluginName, tuple.Item4);
|
||||
string downloadLocation = Application.CurrentApplication.PluginManager.GenerateDependencyRelativePath(pluginName, tuple.Item4);
|
||||
await ServerCom.DownloadFileAsync(tuple.Item3, downloadLocation, tuple.Item2);
|
||||
}
|
||||
);
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.Reflection;
|
||||
|
||||
namespace DiscordBot;
|
||||
|
||||
|
||||
public static class Entry
|
||||
{
|
||||
/// <summary>
|
||||
@@ -58,7 +59,7 @@ public static class Entry
|
||||
static Assembly LoadFromSameFolder(object sender, ResolveEventArgs args)
|
||||
{
|
||||
string requestingAssembly = args.RequestingAssembly?.GetName().Name;
|
||||
var folderPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!, $"Libraries\\{requestingAssembly}");
|
||||
var folderPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!, $"Libraries/{requestingAssembly}");
|
||||
var assemblyPath = Path.Combine(folderPath, new AssemblyName(args.Name).Name + ".dll");
|
||||
if (!File.Exists(assemblyPath))
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user