Closed GrayFace closed 11 months ago
Well, it doesn't. It is first written to a new file and then it replaces the old file, see https://github.com/Youda008/DoomRunner/blob/master/Sources/Utils/FileSystemUtils.cpp#L69C1-L69C1
This has been reported many times already, but i have no idea what's going on and how to fix it. I'm very sorry for these issues, but I'm really helpless until somebody tells me how exactly it happens.
It does! I've just checked - it saves options.json every minute! It does it while I'm not changing anything.
Yes, once every 60 seconds. If i was saving it only on close, and your OS crashed before you close it, you would lose all changes. Do you have any better idea?
Saving only after changes. Simplest fix would be to compare the binary array to what has been read or saved last time.
Alright, got some tips on programing forums, will give it another try in the next version.
I have reduced the frequency of writing to file, by making it write the content only when something has changed. Hopefully that will solve your issue.
DoomRunner seems to constantly rewrite options.json while running. This is horrible in itself, and also leads to the file being filled with zeroes if PC crashes.