]> git.wh0rd.org Git - nano.git/commitdiff
in write_file(), simplify the routine for closing the file just before
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Fri, 7 Apr 2006 05:33:05 +0000 (05:33 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Fri, 7 Apr 2006 05:33:05 +0000 (05:33 +0000)
we indicate success on the statusbar

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

ChangeLog
src/files.c

index 32b1a1b61ce4f177ba682ce2c693cd3909775c59..afffac0d402e74465ebff964759e288b96baa1ce 100644 (file)
--- 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)
index dd8c2a54cf992a662a4f8032763be403076b413a..4240cb1e20f3110bee6c72c6edc2b14585ea117d 100644 (file)
@@ -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) {