files: always update the stat info when the entire file is written

This fixes https://savannah.gnu.org/bugs/?52519.
master
Benno Schulenberg 2017-11-26 20:57:30 +01:00
parent 0c9905dbd0
commit 20aa167c14
1 changed files with 1 additions and 1 deletions

View File

@ -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