aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--composer/ChangeLog11
-rw-r--r--composer/e-msg-composer.c14
2 files changed, 21 insertions, 4 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 2fa473a112..2a4e16c6f0 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,14 @@
+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
+
2007-02-26 Srinivasa Ragavan <sragavan@novell.com>
** Fixes bug #343943
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;
}