Hi
--Issue
I've been struggling with a bug where i would edit some config files to my preferences but out of the blue they would reset to the default values from install, examples include, Adding more levels to the flee market rep, general mod configs. The entire file was resetting to how it was when first downloaded.
--Cause / reproduction
After checking lots of options I found the cause,
Notepad++ creates .BAK files for any file edited e.g. "config.json.bak" this shouldn't be an the issue however for some reason when the server program starts it overwrites the main file with the BAK file in a way that doesn't mark the original file as modified (I'm guessing it moves the backup file e.g. "config.json.bak" to the original file e.g. "config.json" in so both replacing the edited file and loosing the backup file.
--Possible solution
Might need to add a blacklist to ".json.bak " etc files to prevent the server from loading them while keeping the (I assume feature) of allowing naming inconsistency with config files ? or if naming inconsistency isn't expected force the load of only the correct file name / extensions etc.