From 20aa167c1402ce2b9571bfff5a29d2cc9b6fefd2 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 26 Nov 2017 20:57:30 +0100 Subject: [PATCH] files: always update the stat info when the entire file is written This fixes https://savannah.gnu.org/bugs/?52519. --- src/files.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/files.c b/src/files.c index 36c09caa..a3f4c8fc 100644 --- a/src/files.c +++ b/src/files.c @@ -1950,7 +1950,7 @@ bool write_file(const char *name, FILE *f_open, bool tmp, } #ifndef NANO_TINY - if (!openfile->mark) + if (!nonamechange) /* Get or update the stat info to reflect the current state. */ stat_with_alloc(realname, &openfile->current_stat); #endif