Ticket #2470 (closed enhancement: duplicate)
data loss in editor when disk is full
Reported by: | nerijus | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | mcedit | Version: | 4.7.4 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | no branch | Votes for changeset: |
Description
I have partition which is full, so I cannot write to it as a normal user (I can as root):
$ df -h
Failų sistema Size Used Avail Use% Prijungta prie
/dev/md2 380G 361G 0 100% /mnt/d
There is a text file in this partition:
$ ls -l test_file
-rw-rw-rw- 1 nerijus nerijus 10 2011-01-10 03:59 test_file
I edit (F4) it, enter few letters and press F2. Instead os saving file, mc opens "Save As" dialog with file name written. Pressing Enter gives "Cannot save file". I still see file contents in the editor, but
$ ls -l test_file
-rw-rw-rw- 1 nerijus nerijus 0 2011-01-10 04:02 test_file
shows that file's length is already 0. As I cannot save file, I quit editor w/o saving and file content is lost.
Change History
comment:2 Changed 14 years ago by nerijus
Yes, "safe save" does not loose data, it creates empty cooledit5aU2Cc file in the same directory. But I don't agree it's a user error. Software should never loose data. If you choose to not correct "quick save", a warning in big letters should be added "DATA CAN BE LOST".
comment:3 Changed 13 years ago by angel_il
- Type changed from defect to enhancement
- Branch state set to no branch
that's kinda a user error. your editor => options => save mode is "quick safe" instead of "safe save", which implies that you have to assume that a file error during saving will actually clobber an existing file.
i don't know what the default is, though. arguably, "safe save" might be the better choice.