Przeglądaj źródła

Fix early preloader error logs not being written

ghorsington 4 lat temu
rodzic
commit
70980bf946
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      BepInEx.Preloader/Entrypoint.cs

+ 2 - 1
BepInEx.Preloader/Entrypoint.cs

@@ -70,7 +70,8 @@ namespace BepInEx.Preloader
 			{
 			{
 				EnvVars.LoadVars();
 				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
 				// 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));
 				preloaderPath = Path.GetDirectoryName(Path.GetFullPath(EnvVars.DOORSTOP_INVOKE_DLL_PATH));