diff options
Diffstat (limited to 'apps/plugins/lua/loadlib.c')
-rw-r--r-- | apps/plugins/lua/loadlib.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/plugins/lua/loadlib.c b/apps/plugins/lua/loadlib.c index 1cc7ebd7db..87873f133f 100644 --- a/apps/plugins/lua/loadlib.c +++ b/apps/plugins/lua/loadlib.c | |||
@@ -54,7 +54,10 @@ static const char *pushnexttemplate (lua_State *L, const char *path) { | |||
54 | 54 | ||
55 | static const char *findfile (lua_State *L, const char *name, | 55 | static const char *findfile (lua_State *L, const char *name, |
56 | const char *pname) { | 56 | const char *pname) { |
57 | const char *path, *current_path = get_current_path(L, 2); | 57 | get_current_path(L, 2); |
58 | const char *current_path = lua_tostring(L, -1); | ||
59 | const char *path; | ||
60 | |||
58 | name = luaL_gsub(L, name, ".", LUA_DIRSEP); | 61 | name = luaL_gsub(L, name, ".", LUA_DIRSEP); |
59 | lua_getfield(L, LUA_ENVIRONINDEX, pname); | 62 | lua_getfield(L, LUA_ENVIRONINDEX, pname); |
60 | path = lua_tostring(L, -1); | 63 | path = lua_tostring(L, -1); |