emacs truncates files when out of disk space
Binary package hint: emacs22
Description: Ubuntu 8.04.2
When trying to save a file when the target filesystem is full (ie, returning ENOSPC from I/O calls), emacs will truncate the file to zero bytes. It will not save any recovery data for the file (as might be expected, since there is no space to do so).
Instead, it should report that there is no space left and leave the existing contents of the file alone. Causing data loss in this situation is extremely (like, catastrophically) poor behavior.