diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-05-22 07:50:15 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-05-22 07:50:15 +0000 |
commit | 49344572754367d9c149ce55a02ee3dc355e9956 (patch) | |
tree | ddae088358be6c1fc0729c7e3d21fc8247cbf221 /util.c | |
parent | 9d451627946e2d48418d0f1def02c1a5aaa2e4e3 (diff) |
Fix the other place where we construct temporary path names to use
G_DIR_SEPARATOR and G_DIR_SEPARATOR_S, to get rid of one more
horse-frightening pathname.
svn path=/trunk/; revision=10955
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,7 +1,7 @@ /* util.c * Utility routines * - * $Id: util.c,v 1.79 2004/05/10 22:20:24 obiot Exp $ + * $Id: util.c,v 1.80 2004/05/22 07:50:15 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -114,14 +114,14 @@ setup_tmpdir(char *dir) int len = strlen(dir); char *newdir; - /* Append slash if necessary */ - if (dir[len - 1] == '/') { + /* Append path separator if necessary */ + if (dir[len - 1] == G_DIR_SEPARATOR) { newdir = dir; } else { newdir = g_malloc(len + 2); strcpy(newdir, dir); - strcat(newdir, "/"); + strcat(newdir, G_DIR_SEPARATOR_S); } return newdir; } |