summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-05-01 21:27:33 +0200
committerwm4 <wm4@nowhere>2015-05-01 21:51:10 +0200
commit7381db60e28dbedfb9215ca5a4c69aad78b713a4 (patch)
tree493df57f3b97f3ce2fc9972d89eeceb567737e25 /options
parent6814830b9a7740e789a6965f6e4f8da4ba67dd42 (diff)
downloadmpv-7381db60e28dbedfb9215ca5a4c69aad78b713a4.tar.bz2
mpv-7381db60e28dbedfb9215ca5a4c69aad78b713a4.tar.xz
path: expose platform-specific path resolvers
Diffstat (limited to 'options')
-rw-r--r--options/path.c5
1 files changed, 5 insertions, 0 deletions
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));
}
}
}