Skip to content

Issue 604: restoring session restores delete files

Ivan Pravdin requested to merge ipravd/gnome-text-editor-issue-604:main into main

Issue #604 (closed) To prevent restoring deleted files, we check that file exists with g_file_query_exists(). If it does not, then set file to NULL and continue.

However, if no files were restored, code would still create an empty window with _editor_session_create_window_no_draft in editor_session_restore_v1. This would eventaully result in if (self->windows->len == 0 || self->pages->len == 0) condition being true and creating one more window. We would not want that as we already have a window, we just need to put new draft page in it.

Merge request reports