diff options
-rw-r--r-- | mail/ChangeLog | 6 | ||||
-rw-r--r-- | mail/subscribe-dialog.c | 16 |
2 files changed, 12 insertions, 10 deletions
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 <peterw@ximian.com> + + * 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 <fejj@ximian.com> * 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); } |