jifunks / botany

command line virtual plant buddy
ISC License
438 stars 32 forks source link

dump safely by writing to tempfile #9

Closed jmdejong closed 6 years ago

jmdejong commented 6 years ago

First write all the dump to a temporary file. Rename temp file to actual file name when done. This prevents savefile corruption when botany crashes while writing to the save file.