From 0fb08f3ff81575a4749d851404233f34252dd2f2 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Tue, 21 Oct 2003 18:28:34 +0000 Subject: Merge new-ui-branch to the trunk. svn path=/trunk/; revision=22964 --- mail/mail-tools.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'mail/mail-tools.c') diff --git a/mail/mail-tools.c b/mail/mail-tools.c index 99fd749d78..e5fbeed05f 100644 --- a/mail/mail-tools.c +++ b/mail/mail-tools.c @@ -46,6 +46,7 @@ #include "e-util/e-meta.h" #include "mail.h" /*session*/ +#include "mail-component.h" #include "mail-config.h" #include "mail-vfolder.h" #include "mail-tools.h" @@ -62,7 +63,8 @@ mail_tool_get_local_inbox (CamelException *ex) CamelFolder *folder; char *url; - url = g_strdup_printf("file://%s/local/Inbox", evolution_dir); + url = g_strdup_printf("file://%s/local/Inbox", + mail_component_peek_base_directory (mail_component_peek ())); folder = mail_tool_uri_to_folder (url, 0, ex); g_free (url); @@ -120,7 +122,9 @@ mail_tool_get_local_movemail_path (const unsigned char *uri) if (strchr ("/:;=|%&#!*^()\\, ", *c) || !isprint ((int) *c)) *c = '_'; - path = g_strdup_printf ("%s/local/Inbox/movemail.%s", evolution_dir, safe_uri); + path = g_strdup_printf ("%s/local/Inbox/movemail.%s", + mail_component_peek_base_directory (mail_component_peek ()), + safe_uri); g_free (safe_uri); return path; @@ -318,7 +322,7 @@ mail_tool_uri_to_folder (const char *uri, guint32 flags, CamelException *ex) store = camel_session_get_store (session, uri + offset, ex); if (store) { const char *name; - + /* if we have a fragment, then the path is actually used by the store, so the fragment is the path to the folder instead */ if (url->fragment) { @@ -412,6 +416,7 @@ mail_tools_folder_to_url (CamelFolder *folder) static char *meta_data_key(const char *uri, char **pathp) { + const char *base_directory = mail_component_peek_base_directory (mail_component_peek ()); CamelURL *url; GString *path; const char *key; @@ -421,12 +426,12 @@ static char *meta_data_key(const char *uri, char **pathp) if (url == NULL) { g_warning("Trying to retrieve meta-data for unparsable uri: %s", uri); - *pathp = g_build_path(evolution_dir, "meta/unknown", NULL); + *pathp = g_build_path(base_directory, "meta/unknown", NULL); return g_strdup("folder"); } - path = g_string_new(evolution_dir); + path = g_string_new(base_directory); g_string_append_printf(path, "/meta/%s/", url->protocol); if (url->host && url->host[0]) { -- cgit