diff --git a/options/path.c b/options/path.c index 8b1ae9777d..742e292eb1 100644 --- a/options/path.c +++ b/options/path.c @@ -185,8 +185,8 @@ char *mp_get_user_path(void *talloc_ctx, struct mpv_global *global, } else { char type[80]; snprintf(type, sizeof(type), "%.*s", BSTR_P(prefix)); - res = talloc_strdup(talloc_ctx, - mp_get_platform_path(talloc_ctx, type)); + const char *p = mp_get_platform_path(talloc_ctx, type); + res = mp_path_join(talloc_ctx, bstr0(p), rest); } } }