diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-04-20 10:56:27 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2020-04-20 10:57:05 +0200 |
commit | 515fe0f29ba1eeecb65a5a6d104bd1702d3a26c4 (patch) | |
tree | d04d094ae43f302639a913e4ca3ae0e762e7c877 /core/io/file_access_zip.cpp | |
parent | 495b28765d03aa9459bc312ebba190ec208979e7 (diff) | |
download | redot-engine-515fe0f29ba1eeecb65a5a6d104bd1702d3a26c4.tar.gz |
Revert "Made possible to specify where to dump the contents when loading a ".pck" file"
This reverts commit 3c261e0dfa19d9c661ad6ca908a3b8ccee050016.
This was not so useful as is due to the way dependency paths are stored
in scenes and resources.
Diffstat (limited to 'core/io/file_access_zip.cpp')
-rw-r--r-- | core/io/file_access_zip.cpp | 23 |
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 }; |