From 12c3606459583b9f0220ea69808c2c0be52f78c5 Mon Sep 17 00:00:00 2001 From: 0 Date: Wed, 10 Oct 2001 21:50:42 +0000 Subject: Only re-build the folder if we're expunging. Also only clear out the 2001-10-10 * camel-vee-folder.c (vee_sync): Only re-build the folder if we're expunging. Also only clear out the changed folders list if we're expungung and everything worked. svn path=/trunk/; revision=13573 --- camel/ChangeLog | 6 ++++++ camel/camel-vee-folder.c | 12 +++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/camel/ChangeLog b/camel/ChangeLog index f994e8430f..fc4d8da425 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,9 @@ +2001-10-10 + + * camel-vee-folder.c (vee_sync): Only re-build the folder if we're + expunging. Also only clear out the changed folders list if we're + expungung and everything worked. + 2001-10-10 Jeffrey Stedfast * camel-charset-map.c (camel_charset_map_init): Added a hack for diff --git a/camel/camel-vee-folder.c b/camel/camel-vee-folder.c index dc18d5e478..3f05626ceb 100644 --- a/camel/camel-vee-folder.c +++ b/camel/camel-vee-folder.c @@ -527,16 +527,18 @@ vee_sync(CamelFolder *folder, gboolean expunge, CamelException *ex) if (camel_exception_is_set(ex)) break; - if (vee_folder_build_folder(vf, f, ex) == -1) + if (expunge && vee_folder_build_folder(vf, f, ex) == -1) break; node = node->next; } - CAMEL_VEE_FOLDER_LOCK(vf, changed_lock); - g_list_free(p->folders_changed); - p->folders_changed = NULL; - CAMEL_VEE_FOLDER_UNLOCK(vf, changed_lock); + if (expunge && node == NULL) { + CAMEL_VEE_FOLDER_LOCK(vf, changed_lock); + g_list_free(p->folders_changed); + p->folders_changed = NULL; + CAMEL_VEE_FOLDER_UNLOCK(vf, changed_lock); + } CAMEL_VEE_FOLDER_UNLOCK(vf, subfolder_lock); } -- cgit