mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
PauseMenuScripting: resolve absolute 'builtin' path before substring check (#15720)
In 99% of the cases, this behaviour is identical to before. With this commit, it is again possible to have 'builtin' a symlink that e.g. points to the engine source directory, which is helpful for development purposes.
This commit is contained in:
parent
a8c4c55d58
commit
5419345dff
2 changed files with 6 additions and 4 deletions
|
@ -773,7 +773,7 @@ int ScriptApiSecurity::sl_g_loadfile(lua_State *L)
|
|||
std::string path = readParam<std::string>(L, 1);
|
||||
const std::string *contents = script->getClient()->getModFile(path);
|
||||
if (!contents) {
|
||||
std::string error_msg = "Coudln't find script called: " + path;
|
||||
std::string error_msg = "Couldn't find script called: " + path;
|
||||
lua_pushnil(L);
|
||||
lua_pushstring(L, error_msg.c_str());
|
||||
return 2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue