mirror of https://github.com/odrling/Aegisub
Do a better job of setting the module load path in LuaAssFile
Originally committed to SVN as r5643.
This commit is contained in:
parent
8ba559b7f7
commit
60ea67661a
|
@ -209,15 +209,11 @@ namespace Automation4 {
|
|||
lua_pushstring(L, "path");
|
||||
lua_gettable(L, -3);
|
||||
|
||||
wxStringTokenizer toker(lagi_wxString(OPT_GET("Path/Automation/Include")->GetString()), "|", wxTOKEN_STRTOK);
|
||||
while (toker.HasMoreTokens()) {
|
||||
wxFileName path(StandardPaths::DecodePath(toker.GetNextToken()));
|
||||
if (path.IsOk() && !path.IsRelative() && path.DirExists()) {
|
||||
wxCharBuffer p = path.GetLongPath().utf8_str();
|
||||
lua_pushfstring(L, ";%s?.lua;%s?/init.lua", p.data(), p.data());
|
||||
for (size_t i = 0; i < include_path.size(); ++i) {
|
||||
wxCharBuffer p = include_path[i].utf8_str();
|
||||
lua_pushfstring(L, ";%s/?.lua;%s/?/init.lua", p.data(), p.data());
|
||||
lua_concat(L, 2);
|
||||
}
|
||||
}
|
||||
|
||||
lua_settable(L, -3);
|
||||
|
||||
|
|
Loading…
Reference in New Issue