From 0d2e6f76a96be17bb0276a24518ee15ea5b3d469 Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Thu, 16 Aug 2001 15:38:08 +0000 Subject: Instead of hackfully getting the path, use a CamelURL so that escaping is 2001-08-16 Peter Williams * subscribe-dialog.c (fe_done_subscribing): Instead of hackfully getting the path, use a CamelURL so that escaping is handled. Silly me. svn path=/trunk/; revision=12090 --- mail/ChangeLog | 6 ++++++ mail/subscribe-dialog.c | 16 ++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index d3d082f918..dafcca3733 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2001-08-16 Peter Williams + + * subscribe-dialog.c (fe_done_subscribing): Instead of hackfully + getting the path, use a CamelURL so that escaping is handled. Silly + me. + 2001-08-15 Jeffrey Stedfast * mail-display.c (save_part): Remember the filename is in utf8, so diff --git a/mail/subscribe-dialog.c b/mail/subscribe-dialog.c index 7ab8ba38df..1d50a207e5 100644 --- a/mail/subscribe-dialog.c +++ b/mail/subscribe-dialog.c @@ -95,6 +95,7 @@ * + IMAP accounts always show INBOX * - Shell interactions * + Folders are properly created / delete from folder tree when subscribed / unsubscribed + * + Folders with spaces in names / 8bit chars * + Toplevel as well as subfolders * + Mail Folder Cache doesn't complain * - No ETable wackiness @@ -763,28 +764,23 @@ fe_done_subscribing (const char *full_name, const char *name, gboolean subscribe ftree_op_data *closure = (ftree_op_data *) user_data; if (success) { - gchar *path; + CamelURL *url; - /* path = the path component of our uri. - * If the URI is properly encoded there should be no problem - * with this. - */ - - path = strstr (ftree_node_get_uri (closure->data), "//") + 3; - path = strchr (path, '/'); + url = camel_url_new (ftree_node_get_uri (closure->data), NULL); if (subscribe) { closure->data->flags |= FTREE_NODE_SUBSCRIBED; recursive_add_folder (closure->ftree->e_storage, - path, name, + url->path, name, ftree_node_get_uri (closure->data)); } else { closure->data->flags &= ~FTREE_NODE_SUBSCRIBED; /* FIXME: recursively remove folder as well? Possible? */ - evolution_storage_removed_folder (closure->ftree->e_storage, path); + evolution_storage_removed_folder (closure->ftree->e_storage, url->path); } + camel_url_free (url); e_tree_model_node_data_changed (E_TREE_MODEL (closure->ftree), closure->path); } -- cgit v1.2.3