Quote:
Originally Posted by hawhill
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?