aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
authorJason Leach <jleach@ximian.com>2001-06-24 02:49:20 +0800
committerJacob Leach <jleach@src.gnome.org>2001-06-24 02:49:20 +0800
commit657ab7270a6901e48ba36ae30760dac5a12e7186 (patch)
tree400b39697cc1a3fb0e0a38e7b422ee5cf8b7c730 /mail/mail-ops.c
parent92d5ddd3b17ffd521be156b1b8ed472d07889084 (diff)
downloadgsoc2013-evolution-657ab7270a6901e48ba36ae30760dac5a12e7186.tar
gsoc2013-evolution-657ab7270a6901e48ba36ae30760dac5a12e7186.tar.gz
gsoc2013-evolution-657ab7270a6901e48ba36ae30760dac5a12e7186.tar.bz2
gsoc2013-evolution-657ab7270a6901e48ba36ae30760dac5a12e7186.tar.lz
gsoc2013-evolution-657ab7270a6901e48ba36ae30760dac5a12e7186.tar.xz
gsoc2013-evolution-657ab7270a6901e48ba36ae30760dac5a12e7186.tar.zst
gsoc2013-evolution-657ab7270a6901e48ba36ae30760dac5a12e7186.zip
Fixes here for removing folders.
2001-06-23 Jason Leach <jleach@ximian.com> * mail-local.c (local_storage_removed_folder_cb): Fixes here for removing folders. * mail-ops.c (remove_folder_get): Some fixes in here too. svn path=/trunk/; revision=10445
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 6804e835c1..d8897e3726 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -1431,23 +1431,26 @@ remove_folder_get (struct _mail_msg *mm)
{
struct _remove_folder_msg *m = (struct _remove_folder_msg *)mm;
CamelStore *store;
- CamelURL *url;
+ CamelFolder *folder;
m->removed = FALSE;
camel_operation_register (mm->cancel);
-
- store = camel_session_get_store (session, m->uri, &mm->ex);
+
+ folder = mail_tool_uri_to_folder (m->uri, &mm->ex);
+
+ store = camel_folder_get_parent_store (folder);
if (!store)
goto done;
-
- url = camel_url_new (m->uri, NULL);
- camel_store_delete_folder (store, url->path + 1, &mm->ex);
+
+ camel_store_delete_folder (store, camel_folder_get_full_name (folder), &mm->ex);
m->removed = !camel_exception_is_set (&mm->ex);
camel_object_unref (CAMEL_OBJECT (store));
- camel_url_free (url);
done:
+ if (store)
+ camel_object_unref (CAMEL_OBJECT (store));
+
camel_operation_unregister (mm->cancel);
}