test/common: avoid double // in path
Signed-off-by: Ran Benita <ran@unusedvar.com>master
parent
eb23982cab
commit
fe417d841e
|
@ -171,7 +171,8 @@ test_get_path(const char *path_rel)
|
||||||
if (path_rel[0] == '/')
|
if (path_rel[0] == '/')
|
||||||
return strdup(path_rel);
|
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) {
|
if (ret < 0) {
|
||||||
fprintf(stderr, "Failed to allocate path for %s\n", path_rel);
|
fprintf(stderr, "Failed to allocate path for %s\n", path_rel);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue