(io): change the overwrite method when saving with ioAtoms
Description
Change the overwrite method of ioAtoms::SWriter
. Without this MR, when a file is overwritten, it's deleted then saved. But if the saving failed, the old one is still deleted.
Now, the file is saved with a temporary name, then the old one is deleted and the temporary name is renamed with the real one.
Closes #501 (closed)
How to test it?
Try to save something with VRRender
(use jsonz
, cpz
, or xmlz
).