浏览代码

Fix export templates installation error...

Yar-Mukhamedov 7 年之前
父节点
当前提交
bf37bd94b6
共有 1 个文件被更改,包括 9 次插入1 次删除
  1. 9 1
      editor/export_template_manager.cpp

+ 9 - 1
editor/export_template_manager.cpp

@@ -228,7 +228,10 @@ void ExportTemplateManager::_install_from_file(const String &p_file, bool p_use_
 			version = data_str;
 		}
 
-		fc++;
+		if (file.get_file().size() != 0) {
+			fc++;
+		}
+
 		ret = unzGoToNextFile(pkg);
 	}
 
@@ -268,6 +271,11 @@ void ExportTemplateManager::_install_from_file(const String &p_file, bool p_use_
 
 		String file = String(fname).get_file();
 
+		if (file.size() == 0) {
+			ret = unzGoToNextFile(pkg);
+			continue;
+		}
+
 		Vector<uint8_t> data;
 		data.resize(info.uncompressed_size);