From 7381db60e28dbedfb9215ca5a4c69aad78b713a4 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 1 May 2015 21:27:33 +0200 Subject: path: expose platform-specific path resolvers --- options/path.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'options') diff --git a/options/path.c b/options/path.c index d19b360b99..8b1ae9777d 100644 --- a/options/path.c +++ b/options/path.c @@ -182,6 +182,11 @@ char *mp_get_user_path(void *talloc_ctx, struct mpv_global *global, res = mp_find_config_file(talloc_ctx, global, rest0); } else if (bstr_equals0(prefix, "")) { res = mp_path_join(talloc_ctx, bstr0(getenv("HOME")), rest); + } else { + char type[80]; + snprintf(type, sizeof(type), "%.*s", BSTR_P(prefix)); + res = talloc_strdup(talloc_ctx, + mp_get_platform_path(talloc_ctx, type)); } } } -- cgit v1.2.3