summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-05-11 16:59:31 +0200
committerGitHub <noreply@github.com>2022-05-11 16:59:31 +0200
commit2fd73bd32e0b0d153945bc28576b154af3342627 (patch)
tree942928f4418f46c7e1f76330089c2f1ab5fc3421 /editor
parentd68c355145d5c07070fc999eedf8c973d8c70fbe (diff)
parentd36c5514d3893578f1c8cce4d0a2256abfcdd1ed (diff)
Merge pull request #60943 from bruvzg/fix_zipio
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_asset_installer.cpp6
-rw-r--r--editor/editor_export.cpp3
-rw-r--r--editor/export_template_manager.cpp6
-rw-r--r--editor/project_manager.cpp6
4 files changed, 14 insertions, 7 deletions
diff --git a/editor/editor_asset_installer.cpp b/editor/editor_asset_installer.cpp
index 7dcb9a4088..f60dcade82 100644
--- a/editor/editor_asset_installer.cpp
+++ b/editor/editor_asset_installer.cpp
@@ -64,7 +64,8 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) {
package_path = p_path;
Set<String> files_sorted;
- zlib_filefunc_def io = zipio_create_io();
+ Ref<FileAccess> io_fa;
+ zlib_filefunc_def io = zipio_create_io(&io_fa);
unzFile pkg = unzOpen2(p_path.utf8().get_data(), &io);
if (!pkg) {
@@ -237,7 +238,8 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) {
}
void EditorAssetInstaller::ok_pressed() {
- zlib_filefunc_def io = zipio_create_io();
+ Ref<FileAccess> io_fa;
+ zlib_filefunc_def io = zipio_create_io(&io_fa);
unzFile pkg = unzOpen2(package_path.utf8().get_data(), &io);
if (!pkg) {
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index a21ee46818..ef99425f68 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -1334,7 +1334,8 @@ Error EditorExportPlatform::save_pack(const Ref<EditorExportPreset> &p_preset, b
Error EditorExportPlatform::save_zip(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path) {
EditorProgress ep("savezip", TTR("Packing"), 102, true);
- zlib_filefunc_def io = zipio_create_io();
+ Ref<FileAccess> io_fa;
+ zlib_filefunc_def io = zipio_create_io(&io_fa);
zipFile zip = zipOpen2(p_path.utf8().get_data(), APPEND_STATUS_CREATE, nullptr, &io);
ZipData zd;
diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp
index 3526b4ce4c..68796683d2 100644
--- a/editor/export_template_manager.cpp
+++ b/editor/export_template_manager.cpp
@@ -374,7 +374,8 @@ void ExportTemplateManager::_install_file() {
}
bool ExportTemplateManager::_install_file_selected(const String &p_file, bool p_skip_progress) {
- zlib_filefunc_def io = zipio_create_io();
+ Ref<FileAccess> io_fa;
+ zlib_filefunc_def io = zipio_create_io(&io_fa);
unzFile pkg = unzOpen2(p_file.utf8().get_data(), &io);
if (!pkg) {
@@ -676,7 +677,8 @@ Error ExportTemplateManager::install_android_template_from_file(const String &p_
// Uncompress source template.
- zlib_filefunc_def io = zipio_create_io();
+ Ref<FileAccess> io_fa;
+ zlib_filefunc_def io = zipio_create_io(&io_fa);
unzFile pkg = unzOpen2(p_file.utf8().get_data(), &io);
ERR_FAIL_COND_V_MSG(!pkg, ERR_CANT_OPEN, "Android sources not in ZIP format.");
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 565bf94708..b4cbb3b7f1 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -186,7 +186,8 @@ private:
if (mode == MODE_IMPORT || mode == MODE_RENAME) {
if (!valid_path.is_empty() && !d->file_exists("project.godot")) {
if (valid_path.ends_with(".zip")) {
- zlib_filefunc_def io = zipio_create_io();
+ Ref<FileAccess> io_fa;
+ zlib_filefunc_def io = zipio_create_io(&io_fa);
unzFile pkg = unzOpen2(valid_path.utf8().get_data(), &io);
if (!pkg) {
@@ -499,7 +500,8 @@ private:
zip_path = project_path->get_text();
}
- zlib_filefunc_def io = zipio_create_io();
+ Ref<FileAccess> io_fa;
+ zlib_filefunc_def io = zipio_create_io(&io_fa);
unzFile pkg = unzOpen2(zip_path.utf8().get_data(), &io);
if (!pkg) {