aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-migrate.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-30 07:17:52 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-06-01 03:40:51 +0800
commit96822fce5e55775dc800bb6ccc8be64e70f96cfd (patch)
treee8bc0fc5ca7973b872df5efd12658b9d7c235acd /mail/e-mail-migrate.c
parent95ec5734c1c5fb0a513e716b6aad8ad5419c2ca2 (diff)
downloadgsoc2013-evolution-96822fce5e55775dc800bb6ccc8be64e70f96cfd.tar.gz
gsoc2013-evolution-96822fce5e55775dc800bb6ccc8be64e70f96cfd.tar.zst
gsoc2013-evolution-96822fce5e55775dc800bb6ccc8be64e70f96cfd.zip
Fix more places where old-style folder URIs are used.
Diffstat (limited to 'mail/e-mail-migrate.c')
-rw-r--r--mail/e-mail-migrate.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/mail/e-mail-migrate.c b/mail/e-mail-migrate.c
index 2b4f6207fd..d0b58e7b54 100644
--- a/mail/e-mail-migrate.c
+++ b/mail/e-mail-migrate.c
@@ -62,8 +62,9 @@
#include "shell/e-shell.h"
#include "shell/e-shell-migrate.h"
-#include "e-mail-store.h"
#include "e-mail-backend.h"
+#include "e-mail-folder-utils.h"
+#include "e-mail-store.h"
#include "em-utils.h"
#define d(x) x
@@ -1009,6 +1010,7 @@ create_mbox_account (EShellBackend *shell_backend,
{
EMailBackend *mail_backend;
EMailSession *mail_session;
+ CamelStore *store;
CamelURL *url;
EAccountList *accounts;
EAccount *account;
@@ -1053,20 +1055,19 @@ create_mbox_account (EShellBackend *shell_backend,
goto exit;
}
- camel_url_set_fragment (url, "Sent");
- folder_uri = camel_url_to_string (url, 0);
+ e_account_list_add (accounts, account);
+ store = e_mail_store_add_by_account (mail_session, account);
+
+ folder_uri = e_mail_folder_uri_build (store, "Sent");
e_account_set_string (
account, E_ACCOUNT_SENT_FOLDER_URI, folder_uri);
g_free (folder_uri);
- camel_url_set_fragment (url, "Drafts");
- folder_uri = camel_url_to_string (url, 0);
+ folder_uri = e_mail_folder_uri_build (store, "Drafts");
e_account_set_string (
account, E_ACCOUNT_DRAFTS_FOLDER_URI, folder_uri);
g_free (folder_uri);
- e_account_list_add (accounts, account);
- e_mail_store_add_by_account (mail_session, account);
e_account_list_save (accounts);
exit: