Ensure providers and plugins / patchers folders are created if they don't exist

This commit is contained in:
aldelaro5 committed 2024-09-01 09:29:35 -04:00
1 parent 4597be006e
commit 24cf635e65
2 files changed
+9 -3

No files matched your search

+3 -3
View File
@@ -187,12 +187,12 @@ public abstract class BaseChainloader<TPlugin>
InitializeLoggers();
if (!Directory.Exists(Paths.PluginProviderPath))
Directory.CreateDirectory(Paths.PluginProviderPath);
if (!Directory.Exists(Paths.PluginPath))
Directory.CreateDirectory(Paths.PluginPath);
if (!Directory.Exists(Paths.PatcherPluginPath))
Directory.CreateDirectory(Paths.PatcherPluginPath);
_initialized = true;
Logger.Log(LogLevel.Message, "Chainloader initialized");
@@ -31,6 +31,12 @@ public class AssemblyPatcher : IDisposable
public AssemblyPatcher(Func<byte[], string, Assembly> assemblyLoader)
{
this.assemblyLoader = assemblyLoader;
if (!Directory.Exists(Paths.PatcherProviderPath))
Directory.CreateDirectory(Paths.PatcherProviderPath);
if (!Directory.Exists(Paths.PatcherPluginPath))
Directory.CreateDirectory(Paths.PatcherPluginPath);
}
/// <summary>