diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-01-11 00:25:01 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-01-11 00:25:01 +0800 |
commit | b71068d4e3c600668cbb7a6e282be4b21a1d700b (patch) | |
tree | 460565c4479747de6f89d54546774694365fd1e2 /mail/component-factory.c | |
parent | 5a20da25d37a5d3ed7ef5ce453f9a7c018203a2e (diff) | |
download | gsoc2013-evolution-b71068d4e3c600668cbb7a6e282be4b21a1d700b.tar gsoc2013-evolution-b71068d4e3c600668cbb7a6e282be4b21a1d700b.tar.gz gsoc2013-evolution-b71068d4e3c600668cbb7a6e282be4b21a1d700b.tar.bz2 gsoc2013-evolution-b71068d4e3c600668cbb7a6e282be4b21a1d700b.tar.lz gsoc2013-evolution-b71068d4e3c600668cbb7a6e282be4b21a1d700b.tar.xz gsoc2013-evolution-b71068d4e3c600668cbb7a6e282be4b21a1d700b.tar.zst gsoc2013-evolution-b71068d4e3c600668cbb7a6e282be4b21a1d700b.zip |
Fixed a situation in which we could notify the shell listener twice.
2003-01-10 Jeffrey Stedfast <fejj@ximian.com>
* component-factory.c (storage_remove_folder): Fixed a situation
in which we could notify the shell listener twice.
svn path=/trunk/; revision=19401
Diffstat (limited to 'mail/component-factory.c')
-rw-r--r-- | mail/component-factory.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/mail/component-factory.c b/mail/component-factory.c index 5c82a14ffb..dfc1e97f17 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -1261,8 +1261,11 @@ storage_remove_folder (EvolutionStorage *storage, root = camel_store_get_folder_info (store, name, CAMEL_STORE_FOLDER_INFO_FAST | CAMEL_STORE_FOLDER_INFO_RECURSIVE, &ex); camel_url_free (url); - if (!root || camel_exception_is_set (&ex)) - goto exception; + if (!root || camel_exception_is_set (&ex)) { + notify_listener_exception (listener, &ex); + camel_exception_clear (&ex); + return; + } /* walk the tree until we find the particular child folder we want to delete */ fi = root; @@ -1272,23 +1275,20 @@ storage_remove_folder (EvolutionStorage *storage, fi = fi->child; } - if (fi != NULL) { - storage_remove_folder_recursive (storage, store, fi, &ex); - if (camel_exception_is_set (&ex)) - goto exception; - } else { + if (!fi) { notify_listener (listener, GNOME_Evolution_Storage_INVALID_URI); + camel_store_free_folder_info (store, root); + return; } + storage_remove_folder_recursive (storage, store, fi, &ex); camel_store_free_folder_info (store, root); - - notify_listener (listener, GNOME_Evolution_Storage_OK); - return; - -exception: - notify_listener_exception(listener, &ex); - camel_exception_clear (&ex); - camel_store_free_folder_info (store, root); + if (camel_exception_is_set (&ex)) { + notify_listener_exception (listener, &ex); + camel_exception_clear (&ex); + } else { + notify_listener (listener, GNOME_Evolution_Storage_OK); + } } static void |