From 936745c1090d85878c73d5364b0aa15fabbfbf4b Mon Sep 17 00:00:00 2001 From: Jeff Cai Date: Wed, 28 Feb 2007 02:41:29 +0000 Subject: Use g_build_filename to get the tempoary directory name. Fix #399307 2007-02-27 Jeff Cai * e-mktemp.c: (get_dir): Use g_build_filename to get the tempoary directory name. Fix #399307 svn path=/trunk/; revision=33263 --- e-util/ChangeLog | 6 ++++++ e-util/e-mktemp.c | 9 ++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'e-util') 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 + + * e-mktemp.c: (get_dir): + Use g_build_filename to get the tempoary directory name. + Fix #399307 + 2007-02-12 Srinivasa Ragavan ** 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 ()); -- cgit