From 225d4541ffb4d59001841747e0877a175da50c17 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Thu, 6 May 2021 09:02:11 +0200 Subject: fix: extractZipFile is not part of Client but more generic. This solve a crash from mainmenu while extracting the zip --- src/script/lua_api/l_mainmenu.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/script') diff --git a/src/script/lua_api/l_mainmenu.cpp b/src/script/lua_api/l_mainmenu.cpp index b13398539..ee3e72dea 100644 --- a/src/script/lua_api/l_mainmenu.cpp +++ b/src/script/lua_api/l_mainmenu.cpp @@ -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; } -- cgit v1.2.3