NeosModLoader icon indicating copy to clipboard operation
NeosModLoader copied to clipboard

add fallback for config failure

Open art0007i opened this issue 2 years ago • 2 comments

idk if this is a good idea but I hate it when my mods don't load because the config files saved incorrectly

(maybe I should stop spamming alt+f4 to quit the game which crashes it during the exit procedure, so that the config files don't corrupt in the first place)

art0007i avatar Jul 01 '23 13:07 art0007i

I believe that File.Move will throw an exception if the destination path already has a file. IE if consecutive config fails occur or the old failed config wasn't removed after fixing the issue.

XDelta avatar Jul 06 '23 00:07 XDelta

Either add an overwriting bit or write a unique filename to avoid. Don't have an overwrite option on File.Move until like .Net Core 3.

XDelta avatar Jul 06 '23 00:07 XDelta