Daniel Tan
Results
2
comments of
Daniel Tan
Corrupting the file sounds like a red flag. Writing to a tmp file and renames it is a better solution, this also enable us to "rollback" should the write failed.
How about keeping 2 files and versions it, so we don't delete any file in this case. What's left is to decide which version to use then.