+
+ {
+ lua_State *L = luaM_getruntime();
+ lua_getfield(L, LUA_GLOBALSINDEX, "MCore");
+ lua_getfield(L, -1, "folder_hook");
+ lua_remove(L, -2);
+ if (lua_isfunction(L, -1)) {
+ lua_pushstring(L, LastFolder);
+ lua_pushstring(L, CurrentFolder);
+ lua_pcall(L, 2, 0, 0);
+ } else {
+ lua_pop(L, 1);
+ }
+ }