Only reorder recent files on closing documents that have existed on

disk.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2644 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2008-06-05 12:36:48 +00:00
parent aff4cdbc69
commit 4fb246b243
2 changed files with 5 additions and 2 deletions

View File

@ -6,6 +6,9 @@
* src/keyfile.c:
Only save session documents that have existed on disk (don't save
documents with a filename set but have never been saved).
* src/document.c:
Only reorder recent files on closing documents that have existed on
disk.
2008-06-04 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>

View File

@ -536,8 +536,8 @@ gboolean document_remove(guint page_num)
{
return FALSE;
}
/* TODO: check g_file_test(documents[idx]->real_name, G_FILE_TEST_EXISTS) */
if (! main_status.closing_all && g_path_is_absolute(DOC_FILENAME(idx)))
/* Checking real_path makes it likely the file exists on disk */
if (! main_status.closing_all && documents[idx]->real_path != NULL)
ui_add_recent_file(documents[idx]->file_name);
notebook_remove_page(page_num);