git-svn-id: svn://svn.savannah.gnu.org/nano/branches/nano_2_0_branch/nano@4305
35c25a1d-7b9e-4130-9fde-
d3aeb78583b8
+2008-08-08 Chris Allegretta <chrisa@asty.org>
+ * files.c (write_file): Check exit code of fclose(), since in certain out of space conditions the OS will
+ happily report successful fwrite()s until you try and close the file. Fix for Savannah bug
+ #24000: no free space on partition - nano claims successful write - file empty
+
2008-07-11 Mitsuya Shibata <mty.shibata@gmail.com>
* text.c: Fix crashing in help menu when using certain locales
(Savannah bug 23751)
strerror(errno));
goto cleanup_and_exit;
}
- } else
- fclose(f);
+ } else if (fclose(f) != 0) {
+ statusbar(_("Error writing %s: %s"), realname,
+ strerror(errno));
+ goto cleanup_and_exit;
+ }
if (!tmp && append == OVERWRITE) {
if (!nonamechange) {