Browse Source

bug: Use PATH_SEPARATOR instead of slash

In function get_fname_suffix, previously it uses /, but in fact it
should use PATH_SEPARATOR.
Suphanat Chunhapanya 5 years ago
parent
commit
5e1d36c7db
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/test/testing_common.c

+ 2 - 2
src/test/testing_common.c

@@ -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;
 }