aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Cai <jeff.cai@sun.com>2007-02-28 10:41:29 +0800
committerJeff Cai <jeffcai@src.gnome.org>2007-02-28 10:41:29 +0800
commit936745c1090d85878c73d5364b0aa15fabbfbf4b (patch)
tree01b6821d815900b974cc3062140f1c5f05ae2259
parent70f057872e23840ef4ed6834b1559b085a397e1b (diff)
downloadgsoc2013-evolution-936745c1090d85878c73d5364b0aa15fabbfbf4b.tar
gsoc2013-evolution-936745c1090d85878c73d5364b0aa15fabbfbf4b.tar.gz
gsoc2013-evolution-936745c1090d85878c73d5364b0aa15fabbfbf4b.tar.bz2
gsoc2013-evolution-936745c1090d85878c73d5364b0aa15fabbfbf4b.tar.lz
gsoc2013-evolution-936745c1090d85878c73d5364b0aa15fabbfbf4b.tar.xz
gsoc2013-evolution-936745c1090d85878c73d5364b0aa15fabbfbf4b.tar.zst
gsoc2013-evolution-936745c1090d85878c73d5364b0aa15fabbfbf4b.zip
Use g_build_filename to get the tempoary directory name. Fix #399307
2007-02-27 Jeff Cai <jeff.cai@sun.com> * e-mktemp.c: (get_dir): Use g_build_filename to get the tempoary directory name. Fix #399307 svn path=/trunk/; revision=33263
-rw-r--r--e-util/ChangeLog6
-rw-r--r--e-util/e-mktemp.c9
2 files changed, 12 insertions, 3 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index e18a3bc65a..9a56f259b4 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,9 @@
+2007-02-27 Jeff Cai <jeff.cai@sun.com>
+
+ * e-mktemp.c: (get_dir):
+ Use g_build_filename to get the tempoary directory name.
+ Fix #399307
+
2007-02-12 Srinivasa Ragavan <sragavan@novell.com>
** Print settings revamp from Matthew Barnes
diff --git a/e-util/e-mktemp.c b/e-util/e-mktemp.c
index dbd163dfdc..56345d9c68 100644
--- a/e-util/e-mktemp.c
+++ b/e-util/e-mktemp.c
@@ -109,12 +109,15 @@ get_dir (gboolean make)
static time_t last = 0;
#ifdef TEMP_HOME
- path = g_string_new (g_get_home_dir());
- g_string_append_printf(path, "/.evolution/cache/tmp");
- if (make && e_util_mkdir_hier(path->str, 0777) == -1) {
+ char *tmpdir = NULL;
+ tmpdir = g_build_filename(g_get_home_dir(), ".evolution",
+ "cache", "tmp", NULL);
+ path = g_string_new(tmpdir);
+ if (make && e_util_mkdir_hier(tmpdir, 0777) == -1) {
g_string_free(path, TRUE);
path = NULL;
}
+ g_free(tmpdir);
#else
path = g_string_new("/tmp/evolution-");
g_string_append_printf (path, "%d", (int) getuid ());