diff options
Diffstat (limited to 'mail/component-factory.c')
-rw-r--r-- | mail/component-factory.c | 13 |
1 files changed, 11 insertions, 2 deletions
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); |