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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user