nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 125b2f0be551199e91b10b1d937ea5bb21d430cf
parent adfecd24b4627819db41869f0c8c3fcabbcc6505
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Fri,  7 Apr 2006 05:33:05 +0000

in write_file(), simplify the routine for closing the file just before
we indicate success on the statusbar


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3362 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

Diffstat:
MChangeLog | 2++
Msrc/files.c | 7++-----
2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -26,6 +26,8 @@ CVS code - suggested by Jordi) - Clarify the error message when writing a temporary file for prepending fails. (DLR) + - Simplify the routine for closing the file just before we + indicate success on the statusbar. (DLR) - rcfile.c: parse_argument() - Rename variable ptr_bak to ptr_save, for consistency. (DLR) diff --git a/src/files.c b/src/files.c @@ -1622,11 +1622,8 @@ int write_file(const char *name, FILE *f_open, bool tmp, append_type strerror(errno)); goto cleanup_and_exit; } - } else if (fclose(f) == EOF) { - statusbar(_("Error writing %s: %s"), realname, strerror(errno)); - unlink(tempname); - goto cleanup_and_exit; - } + } else + fclose(f); if (!tmp && append == OVERWRITE) { if (!nonamechange) {