aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-msg-composer.c
diff options
context:
space:
mode:
authorSankar P <psankar@novell.com>2007-02-26 18:45:01 +0800
committerSankarasivasubramanian Pasupathilingam <psankar@src.gnome.org>2007-02-26 18:45:01 +0800
commitdd4681234bec5ca6f02f766ac4be002e51ab139c (patch)
treea612b045cb0e823ed6838b46d30877fded4d130b /composer/e-msg-composer.c
parentf2c676feaeda12ddb08b91ea9298a962eef4d76d (diff)
downloadgsoc2013-evolution-dd4681234bec5ca6f02f766ac4be002e51ab139c.tar.gz
gsoc2013-evolution-dd4681234bec5ca6f02f766ac4be002e51ab139c.tar.zst
gsoc2013-evolution-dd4681234bec5ca6f02f766ac4be002e51ab139c.zip
Use ~/.evolution as the auto-save location.
2007-02-26 Sankar P <psankar@novell.com> * e-msg-composer.c: (autosave_manager_query_load_orphans), (autosave_init_file): Use ~/.evolution as the auto-save location. * Patch pushed upstream from Red Hat by Matthew Barnes <mbarnes@redhat.com> * Fixes #336612 svn path=/trunk/; revision=33252
Diffstat (limited to 'composer/e-msg-composer.c')
-rw-r--r--composer/e-msg-composer.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index f040137e30..6ea9920ea7 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1494,8 +1494,10 @@ autosave_manager_query_load_orphans (AutosaveManager *am, GtkWindow *parent)
GSList *match = NULL;
gint len = strlen (AUTOSAVE_SEED);
gint load = FALSE;
-
- dir = g_dir_open (g_get_home_dir(), 0, NULL);
+ gchar *dirname;
+
+ dirname = g_build_filename (g_get_home_dir (), ".evolution", NULL);
+ dir = g_dir_open (dirname, 0, NULL);
if (!dir) {
return;
}
@@ -1504,8 +1506,10 @@ autosave_manager_query_load_orphans (AutosaveManager *am, GtkWindow *parent)
if ((!strncmp (dname, AUTOSAVE_SEED, len - 6))
&& (strlen (dname) == len)
&& (!autosave_is_owned (am, dname))) {
- char *filename = g_strdup_printf ("%s/%s", g_get_home_dir(), dname);
+ gchar *filename;
struct stat st;
+
+ filename = g_build_filename (dirname, dname, NULL);
/*
* check if the file has any length, It is a valid case if it doesn't
@@ -1521,6 +1525,7 @@ autosave_manager_query_load_orphans (AutosaveManager *am, GtkWindow *parent)
}
g_dir_close (dir);
+ g_free (dirname);
if (match != NULL)
load = e_error_run(parent, "mail-composer:recover-autosave", NULL) == GTK_RESPONSE_YES;
@@ -1571,7 +1576,8 @@ autosave_init_file (EMsgComposer *composer)
{
EMsgComposerPrivate *p = composer->priv;
if (p->autosave_file == NULL) {
- p->autosave_file = g_strdup_printf ("%s/%s", g_get_home_dir(), AUTOSAVE_SEED);
+ p->autosave_file = g_build_filename (
+ g_get_home_dir (), ".evolution", AUTOSAVE_SEED, NULL);
p->autosave_fd = g_mkstemp (p->autosave_file);
return TRUE;
}