summaryrefslogtreecommitdiffstats
path: root/core/io/file_access_zip.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-09-25 16:30:01 +0200
committerGitHub <noreply@github.com>2019-09-25 16:30:01 +0200
commit28fcc5e25aa9859361c18c22e48ffd893f7e51cb (patch)
treea8da3f2732cbbe9e55d576b045352ca1305cde9a /core/io/file_access_zip.cpp
parent351c45a4612749da81ffa26783d44880aa1edd7a (diff)
parentaae25abf3080283bbff29b8264f24d37f935922a (diff)
downloadredot-engine-28fcc5e25aa9859361c18c22e48ffd893f7e51cb.tar.gz
Merge pull request #32291 from Dragoncraft89/add_load_resource_flag
Add flag to control the replacement of files by ProjectSettings.load_resource_pack
Diffstat (limited to 'core/io/file_access_zip.cpp')
-rw-r--r--core/io/file_access_zip.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/io/file_access_zip.cpp b/core/io/file_access_zip.cpp
index 81568b2aae..3187f3bab6 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 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)
@@ -210,7 +210,7 @@ bool ZipArchive::try_open_pack(const String &p_path) {
files[fname] = f;
uint8_t md5[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
- PackedData::get_singleton()->add_path(p_path, fname, 1, 0, md5, this);
+ PackedData::get_singleton()->add_path(p_path, fname, 1, 0, md5, this, p_replace_files);
//printf("packed data add path %ls, %ls\n", p_name.c_str(), fname.c_str());
if ((i + 1) < gi.number_entry) {