add fallback for config failure#104
add fallback for config failure#104art0007i wants to merge 1 commit intoneos-modding-group:masterfrom
Conversation
zkxs
left a comment
There was a problem hiding this comment.
This won't actually solve the problem which is causing configs to get corrupted. More details on that in #97.
The effect of this PR would be that if the top-level map fails to deserialize we'd back up the corrupted config and make a fresh one... that's probably fine, and I think it's a good thing to do versus forcing the user to go hunt around their filesystem to manually delete the corrupted file. So you've got my approval.
|
I believe that |
|
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. |
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)