* src/files.c (write_file): Don't re-stat() the file if we're writing out

a marked file (especially that would give it the wrong stat info).  Part
          2 of issue reported by Benno Schulenberg.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4575 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
Chris Allegretta
2013-04-13 02:56:03 +00:00
parent 6251358746
commit 2d34586c43
2 changed files with 5 additions and 1 deletions

View File

@@ -2139,7 +2139,8 @@ bool write_file(const char *name, FILE *f_open, bool tmp, append_type
if (openfile->current_stat == NULL)
openfile->current_stat =
(struct stat *)nmalloc(sizeof(struct stat));
stat(realname, openfile->current_stat);
if (!openfile->mark_set)
stat(realname, openfile->current_stat);
#endif
statusbar(P_("Wrote %lu line", "Wrote %lu lines",