Commit 20aa167c authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

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

This fixes https://savannah.gnu.org/bugs/?52519.
No related merge requests found
Showing with 1 addition and 1 deletion
+1 -1
...@@ -1950,7 +1950,7 @@ bool write_file(const char *name, FILE *f_open, bool tmp, ...@@ -1950,7 +1950,7 @@ bool write_file(const char *name, FILE *f_open, bool tmp,
} }
#ifndef NANO_TINY #ifndef NANO_TINY
if (!openfile->mark) if (!nonamechange)
/* Get or update the stat info to reflect the current state. */ /* Get or update the stat info to reflect the current state. */
stat_with_alloc(realname, &openfile->current_stat); stat_with_alloc(realname, &openfile->current_stat);
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment