Make using profile.lua work again.

Symbolic links are a _bad_ idea with lua script. Lua will search at the
place of the symbolic link for modules _not_ at the actual location of
the script.
This commit is contained in:
Patrick Niklaus 2015-05-01 21:01:21 +02:00
parent f46b600ec0
commit 95088a785a

View File

@ -59,7 +59,7 @@ inline void luaAddScriptFolderToLoadPath(lua_State *lua_state, const char *file_
std::string folder = profile_path.parent_path().string();
// TODO: This code is most probably not Windows safe since it uses UNIX'ish path delimiters
const std::string lua_code =
"package.path = \"" + folder + "/?.lua;profiles/?.lua;\" .. package.path";
"package.path = \"" + folder + "/?.lua;" + folder + "/profiles/?.lua;profiles/?.lua;\" .. package.path";
luaL_dostring(lua_state, lua_code.c_str());
}