mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 15:21:56 -05:00
Merge commit godotengine/godot@c6c464cf9a
This commit is contained in:
@@ -118,7 +118,7 @@ void ZipArchive::close_handle(unzFile p_file) const {
|
||||
}
|
||||
|
||||
unzFile ZipArchive::get_file_handle(const String &p_file) const {
|
||||
ERR_FAIL_COND_V_MSG(!file_exists(p_file), nullptr, "File '" + p_file + " doesn't exist.");
|
||||
ERR_FAIL_COND_V_MSG(!file_exists(p_file), nullptr, vformat("File '%s' doesn't exist.", p_file));
|
||||
File file = files[p_file];
|
||||
|
||||
zlib_filefunc_def io;
|
||||
@@ -138,7 +138,7 @@ unzFile ZipArchive::get_file_handle(const String &p_file) const {
|
||||
io.free_mem = godot_free;
|
||||
|
||||
unzFile pkg = unzOpen2(packages[file.package].filename.utf8().get_data(), &io);
|
||||
ERR_FAIL_NULL_V_MSG(pkg, nullptr, "Cannot open file '" + packages[file.package].filename + "'.");
|
||||
ERR_FAIL_NULL_V_MSG(pkg, nullptr, vformat("Cannot open file '%s'.", packages[file.package].filename));
|
||||
int unz_err = unzGoToFilePos(pkg, &file.file_pos);
|
||||
if (unz_err != UNZ_OK || unzOpenCurrentFile(pkg) != UNZ_OK) {
|
||||
unzClose(pkg);
|
||||
|
||||
Reference in New Issue
Block a user