aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-tools.c
diff options
context:
space:
mode:
authorChris Toshok <toshok@helixcode.com>2000-10-03 13:06:11 +0800
committerChris Toshok <toshok@src.gnome.org>2000-10-03 13:06:11 +0800
commitd697b27b4d9b396d3e27621ba0220564d6d3d013 (patch)
tree75fea62298c87482cce904fe93c89d6f7e4fb215 /mail/mail-tools.c
parent1c1638efa621c06cfc0ba0d592a4dfe555fc7eb1 (diff)
downloadgsoc2013-evolution-d697b27b4d9b396d3e27621ba0220564d6d3d013.tar.gz
gsoc2013-evolution-d697b27b4d9b396d3e27621ba0220564d6d3d013.tar.zst
gsoc2013-evolution-d697b27b4d9b396d3e27621ba0220564d6d3d013.zip
destroy our tree_model and remove the root node. also, release_unref our
2000-10-02 Chris Toshok <toshok@helixcode.com> * subscribe-dialog.c (subscribe_dialog_destroy): destroy our tree_model and remove the root node. also, release_unref our control and view, and unref the listener. * mail-tools.c (mail_tool_uri_to_folder): news url's contain host names too, now. svn path=/trunk/; revision=5690
Diffstat (limited to 'mail/mail-tools.c')
-rw-r--r--mail/mail-tools.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index 6c28372541..0c89fb4cdd 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -459,9 +459,16 @@ mail_tool_get_root_of_store (const char *source_uri, CamelException *ex)
CamelStore *store;
CamelFolder *folder;
+ mail_tool_camel_lock_up();
+
+ if (!strncmp (source_uri, "news://", 7))
+ store = (CamelStore*)camel_session_get_service (session, source_uri,
+ CAMEL_PROVIDER_STORE, ex);
+ else
+ store = camel_session_get_store (session, source_uri, ex);
+
mail_tool_camel_lock_up ();
- store = camel_session_get_store (session, source_uri, ex);
if (!store) {
mail_tool_camel_lock_down ();
return NULL;
@@ -530,10 +537,14 @@ mail_tool_uri_to_folder (const char *uri, CamelException *ex)
mail_tool_camel_lock_up();
store = camel_session_get_store (session, uri, ex);
if (store) {
- const char *folder_path;
+ const char *folder_path, *ptr;
- folder_path = uri + 5;
- folder = camel_store_get_folder (store, folder_path, FALSE, ex);
+ for (ptr = (char *)(uri + 7); *ptr && *ptr != '/'; ptr++);
+ if (*ptr == '/') {
+ ptr++;
+ folder_path = ptr;
+ folder = camel_store_get_folder (store, folder_path, FALSE, ex);
+ }
}
mail_tool_camel_lock_down();