PULSAR-Modders/pulsar-mod-loader

PPL Logging Writes to Folder Without Permissions

Opened this issue · 0 comments

PPL's own log file path is resolving to folders that may not be writable due to OS permissions (e.g., Program Files subfolders). Find a way to redirect it to a writable folder (AppData?) that makes sense.

IOException: Sharing violation on path C:\Program Files (x86)\Steam\steamapps\common\PULSARLostColony\PULSAR_LostColony_Data\Managed\Log.txt
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0 
  at System.IO.StreamWriter..ctor (System.String path, Boolean append, System.Text.Encoding encoding, Int32 bufferSize) [0x00000] in <filename unknown>:0 
  at System.IO.StreamWriter..ctor (System.String path, Boolean append) [0x00000] in <filename unknown>:0 
  at PulsarPluginLoader.Utils.Logger..cctor () [0x00000] in <filename unknown>:0 
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for PulsarPluginLoader.Utils.Logger
at PulsarPluginLoader.PluginManager..ctor () <IL 0x00033, 0x000ed>
at PulsarPluginLoader.PluginManager.get_Instance () <IL 0x0000e, 0x0008f>
at PulsarPluginLoader.Patches.LoadPlugins.Prefix () <IL 0x00028, 0x000d4>
at (wrapper dynamic-method) PLGlobal.Start_Patch1 (object) <IL 0x00000, 0x0001c>