summaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_mainmenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/lua_api/l_mainmenu.cpp')
-rw-r--r--src/script/lua_api/l_mainmenu.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/script/lua_api/l_mainmenu.cpp b/src/script/lua_api/l_mainmenu.cpp
index 57fddc0be..4cfbaec71 100644
--- a/src/script/lua_api/l_mainmenu.cpp
+++ b/src/script/lua_api/l_mainmenu.cpp
@@ -644,9 +644,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, fs::extractZipFile(rendering_engine->get_filesystem(), zipfile, destination));
+ auto fs = RenderingEngine::get_raw_device()->getFileSystem();
+ bool ok = fs::extractZipFile(fs, zipfile, destination);
+ lua_pushboolean(L, ok);
return 1;
}
@@ -916,7 +916,7 @@ void ModApiMainMenu::InitializeAsync(lua_State *L, int top)
API_FCT(delete_dir);
API_FCT(copy_dir);
API_FCT(is_dir);
- //API_FCT(extract_zip); //TODO remove dependency to GuiEngine
+ API_FCT(extract_zip);
API_FCT(may_modify_path);
API_FCT(download_file);
API_FCT(get_min_supp_proto);