aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/component-factory.c13
2 files changed, 19 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 40ce345892..737de40030 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,13 @@
2002-10-08 Jeffrey Stedfast <fejj@ximian.com>
+ * component-factory.c (storage_remove_folder): The CamelFolderInfo
+ that we get back has nodes for all parent folders, so do not
+ delete all folders that have nodes in the returned tree. Instead,
+ descend into the tree until we find the folder we want to delete
+ and start deleting from there.
+
+2002-10-08 Jeffrey Stedfast <fejj@ximian.com>
+
* mail-signature-editor.c (mail_signature_editor): Mark a string
for translation, fixes bug #31942. Thanks to kmaraas@gnome.org for
this patch.
diff --git a/mail/component-factory.c b/mail/component-factory.c
index da74969be4..b85f7e287d 100644
--- a/mail/component-factory.c
+++ b/mail/component-factory.c
@@ -1258,13 +1258,22 @@ storage_remove_folder (EvolutionStorage *storage,
if (!root || camel_exception_is_set (&ex))
goto exception;
+ /* walk the tree until we find the particular child folder we want to delete */
fi = root;
- while (fi && !camel_exception_is_set (&ex)) {
+ while (fi) {
+ if (!strcmp (fi->path, path))
+ break;
+ fi = fi->child;
+ }
+
+ if (fi != NULL) {
storage_remove_folder_recursive (storage, store, fi, &ex);
if (camel_exception_is_set (&ex))
goto exception;
- fi = fi->sibling;
+ } else {
+ notify_listener (listener, GNOME_Evolution_Storage_INVALID_URI);
}
+
camel_store_free_folder_info (store, root);
notify_listener (listener, GNOME_Evolution_Storage_OK);