Menu

#10 aewan, saved file not saved, original file empty

open
nobody
5
2010-02-15
2010-02-15
sbts
No

aewan, saved file not saved, original file empty.
When status line says "file saved" the file on disk is actually empty.
It doesn't get written until you hit enter to acknowledge the message.
aewan truncates the target file before saving,
then doesn't write to the file until AFTER the user has acknowledge a message saying the file has been saved.
This may lead to data loss, and user confusion.

All file writes to be atomic.
eg. truncate file, then immediately write new content. now tell the user it is done.
If you want the user to confirm the save, do so with a clear "do you want to save" BEFORE touching the file

Discussion


Log in to post a comment.

MongoDB Logo MongoDB