From 70980bf9468f24d9742a0adbec4ac59e1b32ac16 Mon Sep 17 00:00:00 2001 From: ghorsington Date: Sun, 21 Jun 2020 21:39:36 +0300 Subject: [PATCH] Fix early preloader error logs not being written --- BepInEx.Preloader/Entrypoint.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BepInEx.Preloader/Entrypoint.cs b/BepInEx.Preloader/Entrypoint.cs index 6c9abc0..c60cb99 100644 --- a/BepInEx.Preloader/Entrypoint.cs +++ b/BepInEx.Preloader/Entrypoint.cs @@ -70,7 +70,8 @@ namespace BepInEx.Preloader { EnvVars.LoadVars(); - silentExceptionLog = Path.Combine(EnvVars.DOORSTOP_PROCESS_PATH, silentExceptionLog); + string gamePath = Path.GetDirectoryName(EnvVars.DOORSTOP_PROCESS_PATH) ?? "."; + silentExceptionLog = Path.Combine(gamePath, silentExceptionLog); // Get the path of this DLL via Doorstop env var because Assembly.Location mangles non-ASCII characters on some versions of Mono for unknown reasons preloaderPath = Path.GetDirectoryName(Path.GetFullPath(EnvVars.DOORSTOP_INVOKE_DLL_PATH));