diff options
author | Avi Halachmi (:avih) <avihpit@yahoo.com> | 2022-02-04 12:44:13 +0200 |
---|---|---|
committer | Avi Halachmi (:avih) <avihpit@yahoo.com> | 2022-02-04 12:53:16 +0200 |
commit | 7849a36beb458985d1e8b15bd2706a6e084a5f33 (patch) | |
tree | 529faa87b51e008f40d38ac5ce035ea8c770a511 /player/javascript.c | |
parent | 5d31c7310c02767e35bfd82d1cc635427518a298 (diff) | |
download | mpv-7849a36beb458985d1e8b15bd2706a6e084a5f33.tar.bz2 mpv-7849a36beb458985d1e8b15bd2706a6e084a5f33.tar.xz |
js: utils.get_user_path: make wrapper of expand-path
When utils.get_user_path was added, the expand-path command didn't
exist. Now it does, so remove the C code, make it a trivial wrapper.
Keep this function for backward compat to not break scripts, but
technically it's not required anymore.
Diffstat (limited to 'player/javascript.c')
-rw-r--r-- | player/javascript.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/player/javascript.c b/player/javascript.c index 7f2dc0970b..453469de50 100644 --- a/player/javascript.c +++ b/player/javascript.c @@ -944,12 +944,6 @@ static void script_join_path(js_State *J, void *af) js_pushstring(J, mp_path_join(af, js_tostring(J, 1), js_tostring(J, 2))); } -static void script_get_user_path(js_State *J, void *af) -{ - const char *path = js_tostring(J, 1); - js_pushstring(J, mp_get_user_path(af, jctx(J)->mpctx->global, path)); -} - // args: is_append, prefixed file name, data (c-str) static void script__write_file(js_State *J, void *af) { @@ -1205,7 +1199,6 @@ static const struct fn_entry utils_fns[] = { FN_ENTRY(file_info, 1), FN_ENTRY(split_path, 1), AF_ENTRY(join_path, 2), - AF_ENTRY(get_user_path, 1), FN_ENTRY(get_env_list, 0), FN_ENTRY(read_file, 2), |