View Single Post
Old 04-24-2014, 05:23 AM   #462
anton79ru
Enthusiast
anton79ru will become famous soon enoughanton79ru will become famous soon enoughanton79ru will become famous soon enoughanton79ru will become famous soon enoughanton79ru will become famous soon enoughanton79ru will become famous soon enough
 
anton79ru's Avatar
 
Posts: 31
Karma: 548
Join Date: Apr 2014
Location: Moscow, Russia
Device: Kobo Aura H2O
Quote:
Originally Posted by hawhill View Post
Maybe we should write to a new file and then do a (atomic, at least in theory) rename().
Another solution may be to create a backup copy at each instance of opening a file, then compare at the end of session and if the resulting file differs from the backup more than it should - replace the current file with the backup copy, otherwise - erase the backup and create a new one the next time that file is opened.

Does it make any sense to you or it's just another way to say what you have in mind?
anton79ru is offline   Reply With Quote