mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
fix: extractZipFile is not part of Client but more generic.
This solve a crash from mainmenu while extracting the zip
This commit is contained in:
parent
ba40b39500
commit
225d4541ff
5 changed files with 72 additions and 69 deletions
|
@ -628,8 +628,9 @@ int ModApiMainMenu::l_extract_zip(lua_State *L)
|
|||
std::string absolute_destination = fs::RemoveRelativePathComponents(destination);
|
||||
|
||||
if (ModApiMainMenu::mayModifyPath(absolute_destination)) {
|
||||
auto rendering_engine = getGuiEngine(L)->m_rendering_engine;
|
||||
fs::CreateAllDirs(absolute_destination);
|
||||
lua_pushboolean(L, getClient(L)->extractZipFile(zipfile, destination));
|
||||
lua_pushboolean(L, fs::extractZipFile(rendering_engine->get_filesystem(), zipfile, destination));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue