Fix the other place where we construct temporary path names to use
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 22 May 2004 07:50:15 +0000 (07:50 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 22 May 2004 07:50:15 +0000 (07:50 +0000)
G_DIR_SEPARATOR and G_DIR_SEPARATOR_S, to get rid of one more
horse-frightening pathname.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10955 f5534014-38df-0310-8fa8-9805f1628bb7

util.c

diff --git a/util.c b/util.c
index 452111e7c9ccbfecfae1e3de89c9507be667371f..524f0a43ed4412ec6a57116526f5ba8615b1213f 100644 (file)
--- a/util.c
+++ b/util.c
@@ -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;
 }