aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-09-26 18:13:20 +0800
committerMilan Crha <mcrha@redhat.com>2011-09-26 18:13:20 +0800
commitf579563b058cfc099ebf858b2ef096d5e61bda92 (patch)
treec71b440f02711e5c4a401be51692e278e93c29a7 /mail
parente0548d25707ad8c4713e2e74c622a92bf4988545 (diff)
downloadgsoc2013-evolution-f579563b058cfc099ebf858b2ef096d5e61bda92.tar
gsoc2013-evolution-f579563b058cfc099ebf858b2ef096d5e61bda92.tar.gz
gsoc2013-evolution-f579563b058cfc099ebf858b2ef096d5e61bda92.tar.bz2
gsoc2013-evolution-f579563b058cfc099ebf858b2ef096d5e61bda92.tar.lz
gsoc2013-evolution-f579563b058cfc099ebf858b2ef096d5e61bda92.tar.xz
gsoc2013-evolution-f579563b058cfc099ebf858b2ef096d5e61bda92.tar.zst
gsoc2013-evolution-f579563b058cfc099ebf858b2ef096d5e61bda92.zip
Bug #656473 - Store server folder cache in user's cache directory
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-session.c17
-rw-r--r--mail/e-mail-session.h1
2 files changed, 17 insertions, 1 deletions
diff --git a/mail/e-mail-session.c b/mail/e-mail-session.c
index 7addaece4a..7ed8720e75 100644
--- a/mail/e-mail-session.c
+++ b/mail/e-mail-session.c
@@ -101,6 +101,7 @@ enum {
};
static gchar *mail_data_dir;
+static gchar *mail_cache_dir;
static gchar *mail_config_dir;
#if 0
@@ -1220,12 +1221,16 @@ EMailSession *
e_mail_session_new (void)
{
const gchar *user_data_dir;
+ const gchar *user_cache_dir;
user_data_dir = mail_session_get_data_dir ();
+ user_cache_dir = mail_session_get_cache_dir ();
return g_object_new (
E_TYPE_MAIL_SESSION,
- "user-data-dir", user_data_dir, NULL);
+ "user-data-dir", user_data_dir,
+ "user-cache-dir", user_cache_dir,
+ NULL);
}
MailFolderCache *
@@ -1601,6 +1606,16 @@ mail_session_get_data_dir (void)
}
const gchar *
+mail_session_get_cache_dir (void)
+{
+ if (G_UNLIKELY (mail_cache_dir == NULL))
+ mail_cache_dir = g_build_filename (
+ e_get_user_cache_dir (), "mail", NULL);
+
+ return mail_cache_dir;
+}
+
+const gchar *
mail_session_get_config_dir (void)
{
if (G_UNLIKELY (mail_config_dir == NULL))
diff --git a/mail/e-mail-session.h b/mail/e-mail-session.h
index 653404ca7a..165b335a19 100644
--- a/mail/e-mail-session.h
+++ b/mail/e-mail-session.h
@@ -116,6 +116,7 @@ CamelFolder * e_mail_session_uri_to_folder_finish
void mail_session_flush_filter_log (EMailSession *session);
const gchar * mail_session_get_data_dir (void);
+const gchar * mail_session_get_cache_dir (void);
const gchar * mail_session_get_config_dir (void);
G_END_DECLS