1
1

2010-01-14 Chris Allegretta <chrisa@asty.org>

* files.c (do_writeout): Fix for crash / incorrect external modification warning
          due to earlier fix in r4467.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4474 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
Chris Allegretta 2010-01-14 06:32:37 +00:00
родитель 1a7a91b779
Коммит 6cf05d487f
3 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -1,3 +1,7 @@
2010-01-14 Chris Allegretta <chrisa@asty.org>
* files.c (do_writeout): Fix for crash / incorrect external modification warning
due to earlier fix in r4467.
2010-01-12 Chris Allegretta <chrisa@asty.org>
* move.c (do_page_up, do_page_down): Fix issues with not enough scrolling down/up
and cursor centering.

Просмотреть файл

@ -1504,7 +1504,7 @@ bool write_file(const char *name, FILE *f_open, bool tmp, append_type
* specified it interactively), use the info we just got from
* stat()ing or else we will chase null pointers when we do
* modtime checks, preserve file times, etc. during backup */
if(openfile->current_stat == NULL)
if (openfile->current_stat == NULL && realexists)
openfile->current_stat = &st;
/* We backup only if the backup toggle is set, the file isn't
@ -2125,6 +2125,7 @@ bool do_writeout(bool exiting)
}
}
#ifndef NANO_TINY
if (name_exists && openfile->current_stat && openfile->current_stat->st_mtime < st.st_mtime) {
i = do_yesno_prompt(FALSE,
_("File was modified since you opened it, continue saving ? "));

Просмотреть файл

@ -517,6 +517,7 @@ openfilestruct *make_new_opennode(void)
newnode->filebot = NULL;
newnode->edittop = NULL;
newnode->current = NULL;
newnode->current_stat = NULL;
#ifndef NANO_TINY
newnode->last_action = OTHER;
#endif