aboutsummaryrefslogtreecommitdiffstats
path: root/libemail-engine/e-mail-session.c
diff options
context:
space:
mode:
Diffstat (limited to 'libemail-engine/e-mail-session.c')
-rw-r--r--libemail-engine/e-mail-session.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libemail-engine/e-mail-session.c b/libemail-engine/e-mail-session.c
index c7853f9b56..a2f56814cf 100644
--- a/libemail-engine/e-mail-session.c
+++ b/libemail-engine/e-mail-session.c
@@ -688,14 +688,18 @@ mail_session_configure_local_store (EMailSession *session)
session->priv->local_store = service; /* takes ownership */
g_return_if_fail (service != NULL);
- settings = camel_service_get_settings (service);
- local_settings = CAMEL_LOCAL_SETTINGS (settings);
- data_dir = camel_session_get_user_data_dir (camel_session);
+ settings = camel_service_ref_settings (service);
+ data_dir = camel_session_get_user_data_dir (camel_session);
path = g_build_filename (data_dir, E_MAIL_SESSION_LOCAL_UID, NULL);
+
+ local_settings = CAMEL_LOCAL_SETTINGS (settings);
camel_local_settings_set_path (local_settings, path);
+
g_free (path);
+ g_object_unref (settings);
+
/* Shouldn't need to worry about other mail applications
* altering files in our local mail store. */
g_object_set (service, "need-summary-check", FALSE, NULL);