diff --git a/BepInEx.Core/Bootstrap/BaseChainloader.cs b/BepInEx.Core/Bootstrap/BaseChainloader.cs index c233d7e..2d57639 100644 --- a/BepInEx.Core/Bootstrap/BaseChainloader.cs +++ b/BepInEx.Core/Bootstrap/BaseChainloader.cs @@ -187,12 +187,12 @@ public abstract class BaseChainloader 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"); diff --git a/BepInEx.Preloader.Core/Patching/AssemblyPatcher.cs b/BepInEx.Preloader.Core/Patching/AssemblyPatcher.cs index 64e04d8..3022e6a 100644 --- a/BepInEx.Preloader.Core/Patching/AssemblyPatcher.cs +++ b/BepInEx.Preloader.Core/Patching/AssemblyPatcher.cs @@ -31,6 +31,12 @@ public class AssemblyPatcher : IDisposable public AssemblyPatcher(Func assemblyLoader) { this.assemblyLoader = assemblyLoader; + + if (!Directory.Exists(Paths.PatcherProviderPath)) + Directory.CreateDirectory(Paths.PatcherProviderPath); + + if (!Directory.Exists(Paths.PatcherPluginPath)) + Directory.CreateDirectory(Paths.PatcherPluginPath); } ///