1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Fix decoding UTF-8 filenames on unzipping.

(cherry picked from commit d2573c1636)
This commit is contained in:
bruvzg
2022-01-05 14:27:11 +02:00
committed by Rémi Verschelde
parent 8d3e16676d
commit d2558bdc8c
8 changed files with 16 additions and 16 deletions

View File

@@ -404,7 +404,7 @@ bool ExportTemplateManager::_install_file_selected(const String &p_file, bool p_
char fname[16384];
ret = unzGetCurrentFileInfo(pkg, &info, fname, 16384, nullptr, 0, nullptr, 0);
String file = fname;
String file = String::utf8(fname);
if (file.ends_with("version.txt")) {
Vector<uint8_t> data;
data.resize(info.uncompressed_size);
@@ -465,7 +465,7 @@ bool ExportTemplateManager::_install_file_selected(const String &p_file, bool p_
char fname[16384];
unzGetCurrentFileInfo(pkg, &info, fname, 16384, nullptr, 0, nullptr, 0);
String file_path(String(fname).simplify_path());
String file_path(String::utf8(fname).simplify_path());
String file = file_path.get_file();
@@ -711,7 +711,7 @@ Error ExportTemplateManager::install_android_template_from_file(const String &p_
char fpath[16384];
ret = unzGetCurrentFileInfo(pkg, &info, fpath, 16384, nullptr, 0, nullptr, 0);
String path = fpath;
String path = String::utf8(fpath);
String base_dir = path.get_base_dir();
if (!path.ends_with("/")) {