summaryrefslogtreecommitdiff
path: root/test/common.c
diff options
context:
space:
mode:
authorRan Benita <ran@unusedvar.com>2019-12-28 13:40:38 +0200
committerRan Benita <ran@unusedvar.com>2019-12-28 13:40:38 +0200
commitfe417d841e838adfd57f591ea27bd34a999eeb77 (patch)
tree2e956116735e857e577ad12b015a967450f9f6e4 /test/common.c
parenteb23982cab4d7a39bf59d24e5aefd712a0da640a (diff)
downloadxorg-lib-libxkbcommon-fe417d841e838adfd57f591ea27bd34a999eeb77.tar.gz
test/common: avoid double // in path
Signed-off-by: Ran Benita <ran@unusedvar.com>
Diffstat (limited to 'test/common.c')
-rw-r--r--test/common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/common.c b/test/common.c
index e397e12..1a56521 100644
--- a/test/common.c
+++ b/test/common.c
@@ -171,7 +171,8 @@ test_get_path(const char *path_rel)
if (path_rel[0] == '/')
return strdup(path_rel);
- ret = asprintf(&path, "%s/test/data/%s", srcdir, path_rel);
+ ret = asprintf(&path, "%s/test/data%s%s", srcdir,
+ path_rel[0] ? "/" : "", path_rel);
if (ret < 0) {
fprintf(stderr, "Failed to allocate path for %s\n", path_rel);
return NULL;