summaryrefslogtreecommitdiff
path: root/core/io/file_access_zip.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/io/file_access_zip.cpp')
-rw-r--r--core/io/file_access_zip.cpp23
1 files changed, 2 insertions, 21 deletions
diff --git a/core/io/file_access_zip.cpp b/core/io/file_access_zip.cpp
index 5696e47193..57de66afaf 100644
--- a/core/io/file_access_zip.cpp
+++ b/core/io/file_access_zip.cpp
@@ -160,7 +160,7 @@ unzFile ZipArchive::get_file_handle(String p_file) const {
return pkg;
}
-bool ZipArchive::try_open_pack(const String &p_path, bool p_replace_files, const String &p_destination) {
+bool ZipArchive::try_open_pack(const String &p_path, bool p_replace_files) {
//printf("opening zip pack %ls, %i, %i\n", p_name.c_str(), p_name.extension().nocasecmp_to("zip"), p_name.extension().nocasecmp_to("pcz"));
if (p_path.get_extension().nocasecmp_to("zip") != 0 && p_path.get_extension().nocasecmp_to("pcz") != 0)
@@ -206,26 +206,7 @@ bool ZipArchive::try_open_pack(const String &p_path, bool p_replace_files, const
f.package = pkg_num;
unzGetFilePos(zfile, &f.file_pos);
- String fname;
- if (p_destination != "") {
- String destination = "res://" + p_destination;
- if (!destination.ends_with("/")) {
- destination += "/";
- }
-
- DirAccess *dir = DirAccess::create(DirAccess::ACCESS_RESOURCES);
- if (!dir->dir_exists(destination)) {
- memdelete(dir);
-
- return false;
- }
- memdelete(dir);
-
- fname = destination + filename_inzip;
- } else {
- fname = String("res://") + filename_inzip;
- }
-
+ String fname = String("res://") + filename_inzip;
files[fname] = f;
uint8_t md5[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };