diff options
author | Florian Kothmeier <floriankothmeier@web.de> | 2019-09-23 22:41:25 +0200 |
---|---|---|
committer | Florian Kothmeier <floriankothmeier@web.de> | 2019-09-25 15:29:59 +0200 |
commit | aae25abf3080283bbff29b8264f24d37f935922a (patch) | |
tree | dc1d35e5d2aa8d7816a8b4fb55bd05ad37d54c2b /core/io/file_access_zip.cpp | |
parent | 0ea54eeb0672c405d7ad0edf8444f0d86158f8b6 (diff) | |
download | redot-engine-aae25abf3080283bbff29b8264f24d37f935922a.tar.gz |
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.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/io/file_access_zip.cpp b/core/io/file_access_zip.cpp index abc0bd064d..a0f0f74ef8 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) { |