diff options
-rw-r--r-- | e-util/ChangeLog | 6 | ||||
-rw-r--r-- | e-util/e-mktemp.c | 9 |
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 ()); |