]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
bug: Use PATH_SEPARATOR instead of slash
authorSuphanat Chunhapanya <haxx.pop@gmail.com>
Sun, 2 Sep 2018 20:19:24 +0000 (03:19 +0700)
committerDavid Goulet <dgoulet@torproject.org>
Fri, 7 Sep 2018 18:03:55 +0000 (14:03 -0400)
In function get_fname_suffix, previously it uses /, but in fact it
should use PATH_SEPARATOR.

src/test/testing_common.c

index 3880bca9c519c62345589494eea3d8ef013beb08..56cac99eb83bcf7bb0e8eb6826903a265935b6fb 100644 (file)
@@ -112,8 +112,8 @@ get_fname_suffix(const char *name, const char *suffix)
   setup_directory();
   if (!name)
     return temp_dir;
-  tor_snprintf(buf,sizeof(buf),"%s/%s%s%s",temp_dir,name,suffix ? "_" : "",
-               suffix ? suffix : "");
+  tor_snprintf(buf,sizeof(buf),"%s%s%s%s%s", temp_dir, PATH_SEPARATOR, name,
+               suffix ? "_" : "", suffix ? suffix : "");
   return buf;
 }