aboutsummaryrefslogtreecommitdiffstats
path: root/mail/component-factory.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-10-10 01:30:06 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-10-10 01:30:06 +0800
commit944fdf5ac66142b7da9d6c383cd305017aea399d (patch)
tree2fb615dac95e0dcc1d0e1c042533616e943e7426 /mail/component-factory.c
parentaa99a5060a955532c3703dd6f1a9810766396217 (diff)
downloadgsoc2013-evolution-944fdf5ac66142b7da9d6c383cd305017aea399d.tar
gsoc2013-evolution-944fdf5ac66142b7da9d6c383cd305017aea399d.tar.gz
gsoc2013-evolution-944fdf5ac66142b7da9d6c383cd305017aea399d.tar.bz2
gsoc2013-evolution-944fdf5ac66142b7da9d6c383cd305017aea399d.tar.lz
gsoc2013-evolution-944fdf5ac66142b7da9d6c383cd305017aea399d.tar.xz
gsoc2013-evolution-944fdf5ac66142b7da9d6c383cd305017aea399d.tar.zst
gsoc2013-evolution-944fdf5ac66142b7da9d6c383cd305017aea399d.zip
The CamelFolderInfo that we get back has nodes for all parent folders, so
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. svn path=/trunk/; revision=18357
Diffstat (limited to 'mail/component-factory.c')
-rw-r--r--mail/component-factory.c13
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);