diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-10-10 01:30:06 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-10-10 01:30:06 +0800 |
commit | 944fdf5ac66142b7da9d6c383cd305017aea399d (patch) | |
tree | 2fb615dac95e0dcc1d0e1c042533616e943e7426 | |
parent | aa99a5060a955532c3703dd6f1a9810766396217 (diff) | |
download | gsoc2013-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
-rw-r--r-- | mail/ChangeLog | 8 | ||||
-rw-r--r-- | mail/component-factory.c | 13 |
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); |