From 40997b8ae5b4065b3e71d4369eaba14c991e5027 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 9 May 2015 15:04:05 +0200 Subject: lua: remove deprecated "lua" sub directories The compatibility code and the deprecation warning were at least in releases 0.8 and 0.9 - time to get rid of them. --- player/lua.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'player/lua.c') diff --git a/player/lua.c b/player/lua.c index 4ef772fd84..8cfcd059a4 100644 --- a/player/lua.c +++ b/player/lua.c @@ -277,16 +277,10 @@ static void set_path(lua_State *L) const char *path = lua_tostring(L, -1); char *newpath = talloc_strdup(tmp, path ? path : ""); - char *dirs[] = {"scripts", "lua", NULL}; - for (int s = 0; dirs[s]; s++) { - char **luadir = mp_find_all_config_files(tmp, get_mpctx(L)->global, - dirs[s]); - for (int i = 0; luadir && luadir[i]; i++) { - // No need to display a warning for lua files in the deprecated - // 'lua' dirs since scripting.c already warned on them - newpath = talloc_asprintf_append(newpath, ";%s", - mp_path_join(tmp, bstr0(luadir[i]), bstr0("?.lua"))); - } + char **luadir = mp_find_all_config_files(tmp, get_mpctx(L)->global, "scripts"); + for (int i = 0; luadir && luadir[i]; i++) { + newpath = talloc_asprintf_append(newpath, ";%s", + mp_path_join(tmp, bstr0(luadir[i]), bstr0("?.lua"))); } lua_pushstring(L, newpath); // package path newpath -- cgit v1.2.3