aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/camel-vee-folder.c12
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 <NotZed@Ximian.com>
+
+ * 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 <fejj@ximian.com>
* 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);
}