summaryrefslogtreecommitdiffstats
path: root/core/io/file_access_zip.cpp
diff options
context:
space:
mode:
authorGeorge L. Albany <Megacake1234@gmail.com>2024-11-03 05:10:14 +0000
committerGitHub <noreply@github.com>2024-11-03 05:10:14 +0000
commit70f9c12cfbcea6dff89b2a6f4868a9e6fe3866f8 (patch)
treef202e4a27092f0fdd9d579eb46e6828ecb4673e1 /core/io/file_access_zip.cpp
parent9043ceac65972c4195dd71f15a8a1cc7aa72985f (diff)
parenta684ee1dec108bb1a050f07ec3dd73fd5ef02dbc (diff)
downloadredot-engine-70f9c12cfbcea6dff89b2a6f4868a9e6fe3866f8.tar.gz
Merge pull request #834 from Spartan322/merge/c6c464c
Merge commit godotengine/godot@c6c464c
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 38f86bd04d..71ce18145a 100644
--- a/core/io/file_access_zip.cpp
+++ b/core/io/file_access_zip.cpp
@@ -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);