aboutsummaryrefslogtreecommitdiffstats
path: root/mail/subscribe-dialog.c
diff options
context:
space:
mode:
authorPeter Williams <peterw@ximian.com>2001-08-16 23:38:08 +0800
committerPeter Williams <peterw@src.gnome.org>2001-08-16 23:38:08 +0800
commit0d2e6f76a96be17bb0276a24518ee15ea5b3d469 (patch)
tree59f9d76dc8017c6192d823201b3d3f134d85f791 /mail/subscribe-dialog.c
parent7fa4db74cb9bb11ea12d6be6a88c6882e67f7021 (diff)
downloadgsoc2013-evolution-0d2e6f76a96be17bb0276a24518ee15ea5b3d469.tar.gz
gsoc2013-evolution-0d2e6f76a96be17bb0276a24518ee15ea5b3d469.tar.zst
gsoc2013-evolution-0d2e6f76a96be17bb0276a24518ee15ea5b3d469.zip
Instead of hackfully getting the path, use a CamelURL so that escaping is
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. svn path=/trunk/; revision=12090
Diffstat (limited to 'mail/subscribe-dialog.c')
-rw-r--r--mail/subscribe-dialog.c16
1 files changed, 6 insertions, 10 deletions
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);
}