(autosave_manager_query_load_orphans): remove zero length orphans so that

2001-07-06  Larry Ewing  <lewing@ximian.com>

	(autosave_manager_query_load_orphans): remove zero length orphans
	so that they don't clutter things up.

svn path=/trunk/; revision=10874
This commit is contained in:
Larry Ewing
2001-07-06 22:43:36 +00:00
committed by Larry Ewing
parent b1279f80c6
commit 85bb331cb7
2 changed files with 6 additions and 2 deletions

View File

@ -3,6 +3,8 @@
* e-msg-composer.c (autosave_manager_new): add missing static.
(best_encoding): make sure we don't try to call iconv_open with a
NULL tocode.
(autosave_manager_query_load_orphans): remove zero length orphans
so that they don't clutter things up.
2001-07-06 Jeffrey Stedfast <fejj@ximian.com>

View File

@ -1156,9 +1156,11 @@ autosave_manager_query_load_orphans (AutosaveManager *am, EMsgComposer *composer
* check if the file has any length, It is a valid case if it doesn't
* so we simply don't ask then.
*/
if (stat (filename, &st) < 0 || st.st_size == 0)
if (stat (filename, &st) < 0 || st.st_size == 0) {
unlink (filename);
continue;
}
dialog = gnome_ok_cancel_dialog_parented (_("Evolution has detected an editor buffer from a previous session.\n"
"Would you like to recover this buffer?"),
autosave_query_cb, &ok, GTK_WINDOW (composer));