aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-tools.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2003-10-22 02:28:34 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2003-10-22 02:28:34 +0800
commit0fb08f3ff81575a4749d851404233f34252dd2f2 (patch)
tree7e03befedc3a76fd104921dbbc616810d87333be /mail/mail-tools.c
parent0e19f2c16de592607a341eb9974d31e4e47e02b5 (diff)
downloadgsoc2013-evolution-0fb08f3ff81575a4749d851404233f34252dd2f2.tar.gz
gsoc2013-evolution-0fb08f3ff81575a4749d851404233f34252dd2f2.tar.zst
gsoc2013-evolution-0fb08f3ff81575a4749d851404233f34252dd2f2.zip
Merge new-ui-branch to the trunk.
svn path=/trunk/; revision=22964
Diffstat (limited to 'mail/mail-tools.c')
-rw-r--r--mail/mail-tools.c15
1 files changed, 10 insertions, 5 deletions
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]) {