aboutsummaryrefslogtreecommitdiff
path: root/src/common/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/util.c')
-rw-r--r--src/common/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/util.c b/src/common/util.c
index d21d0c07d1..a66edf4332 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -1549,14 +1549,14 @@ expand_filename(const char *filename)
}
tor_assert(home);
/* Remove trailing slash. */
- if (strlen(home)>1 && !strcmpend(home,"/")) {
+ if (strlen(home)>1 && !strcmpend(home,PATH_SEPARATOR)) {
home[strlen(home)-1] = '\0';
}
/* Plus one for /, plus one for NUL.
* Round up to 16 in case we can't do math. */
len = strlen(home)+strlen(rest)+16;
result = tor_malloc(len);
- tor_snprintf(result,len,"%s/%s",home,rest?rest:"");
+ tor_snprintf(result,len,"%s"PATH_SEPARATOR"%s",home,rest?rest:"");
tor_free(home);
return result;
} else {