summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--options/path.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/options/path.c b/options/path.c
index 2895b7224b..4150a72a3f 100644
--- a/options/path.c
+++ b/options/path.c
@@ -118,7 +118,7 @@ static char **mp_find_all_config_files_limited(void *talloc_ctx,
bstr fn;
bstr_split_tok(s, "|", &fn, &s);
- char *file = talloc_asprintf(ret, "%s/%.*s", dir, BSTR_P(fn));
+ char *file = mp_path_join_bstr(ret, bstr0(dir), fn);
if (mp_path_exists(file))
MP_TARRAY_APPEND(NULL, ret, num_ret, file);
}