aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-tools.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@HelixCode.com>2000-08-11 11:50:39 +0800
committerMichael Zucci <zucchi@src.gnome.org>2000-08-11 11:50:39 +0800
commitdfa46fe1d19552c600ae3b6190a056c7ac51dac1 (patch)
tree296878019b414d3b8e8949df06a48fb3e95aa15a /mail/mail-tools.c
parent3834c823592912bcaf881cb94e949612ce29baf2 (diff)
downloadgsoc2013-evolution-dfa46fe1d19552c600ae3b6190a056c7ac51dac1.tar
gsoc2013-evolution-dfa46fe1d19552c600ae3b6190a056c7ac51dac1.tar.gz
gsoc2013-evolution-dfa46fe1d19552c600ae3b6190a056c7ac51dac1.tar.bz2
gsoc2013-evolution-dfa46fe1d19552c600ae3b6190a056c7ac51dac1.tar.lz
gsoc2013-evolution-dfa46fe1d19552c600ae3b6190a056c7ac51dac1.tar.xz
gsoc2013-evolution-dfa46fe1d19552c600ae3b6190a056c7ac51dac1.tar.zst
gsoc2013-evolution-dfa46fe1d19552c600ae3b6190a056c7ac51dac1.zip
Properly handle different local file formats. The folder isn't always
2000-08-11 Not Zed <NotZed@HelixCode.com> * mail-tools.c (mail_tool_get_local_inbox_url): Properly handle different local file formats. The folder isn't always mbox. (mail_tool_do_movemail): Movemail always uses an mbox format however. (mail_tool_get_local_movemail_url): What is the mbox url, it is always the same type, mbox. (mail_tool_fetch_mail_into_searchable): Same here. * mail-local.c (mail_local_map_uri): Map a local uri to the real uri. svn path=/trunk/; revision=4724
Diffstat (limited to 'mail/mail-tools.c')
-rw-r--r--mail/mail-tools.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index de4be18a07..dba9a60d3c 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -120,6 +120,17 @@ mail_tool_get_folder_from_urlname (const gchar *url, const gchar *name,
gchar *
mail_tool_get_local_inbox_url (void)
{
+ char *uri, *new;
+
+ uri = g_strdup_printf("file://%s/local/Inbox", evolution_dir);
+ new = mail_local_map_uri(uri);
+ g_free(uri);
+ return new;
+}
+
+gchar *
+mail_tool_get_local_movemail_url (void)
+{
return g_strdup_printf ("mbox://%s/local/Inbox", evolution_dir);
}
@@ -164,7 +175,7 @@ mail_tool_do_movemail (const gchar *source_url, CamelException *ex)
/* Set up our destination. */
- dest_url = mail_tool_get_local_inbox_url();
+ dest_url = mail_tool_get_local_movemail_url();
dest_path = mail_tool_get_local_movemail_path();
/* Create a new movemail mailbox file of 0 size */
@@ -447,7 +458,7 @@ mail_tool_fetch_mail_into_searchable (const char *source_url, gboolean keep_on_s
* so that the folder browser can search it. */
gchar *url;
- url = mail_tool_get_local_inbox_url();
+ url = mail_tool_get_local_movemail_url();
search_folder = mail_tool_get_folder_from_urlname (url, "movemail", TRUE, ex);
g_free (url);
if (camel_exception_is_set (ex))