1
0
Fork 0
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:
SmallJoker 2025-02-02 19:04:50 +01:00 committed by GitHub
parent a8c4c55d58
commit 5419345dff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 4 deletions

View file

@ -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;