Ignore __MACOSX directory in export template collection ZIP file and project import ZIP file
Update editor/export/export_template_manager.cpp Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
This commit is contained in:
@ -437,6 +437,13 @@ bool ExportTemplateManager::_install_file_selected(const String &p_file, bool p_
|
||||
}
|
||||
|
||||
String file = String::utf8(fname);
|
||||
|
||||
// Skip the __MACOSX directory created by macOS's built-in file zipper.
|
||||
if (file.begins_with("__MACOSX")) {
|
||||
ret = unzGoToNextFile(pkg);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (file.ends_with("version.txt")) {
|
||||
Vector<uint8_t> uncomp_data;
|
||||
uncomp_data.resize(info.uncompressed_size);
|
||||
@ -512,7 +519,8 @@ bool ExportTemplateManager::_install_file_selected(const String &p_file, bool p_
|
||||
|
||||
String file = file_path.get_file();
|
||||
|
||||
if (file.size() == 0) {
|
||||
// Skip the __MACOSX directory created by macOS's built-in file zipper.
|
||||
if (file.is_empty() || file.begins_with("__MACOSX")) {
|
||||
ret = unzGoToNextFile(pkg);
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user