Преглед на файлове

修复导表脚本一处bug:当导出的客户端配置为空时,会报错。

大爷 преди 1 година
родител
ревизия
7381a8f21b
променени са 1 файла, в които са добавени 5 реда и са изтрити 0 реда
  1. 5 0
      Share/Tool/ExcelExporter/ExcelExporter.cs

+ 5 - 0
Share/Tool/ExcelExporter/ExcelExporter.cs

@@ -282,6 +282,11 @@ namespace ET
         private static Assembly DynamicBuild(ConfigType configType)
         private static Assembly DynamicBuild(ConfigType configType)
         {
         {
             string classPath = GetClassDir(configType);
             string classPath = GetClassDir(configType);
+            if (!Directory.Exists(classPath))
+            {
+                Directory.CreateDirectory(classPath);
+            }
+
             List<SyntaxTree> syntaxTrees = new List<SyntaxTree>();
             List<SyntaxTree> syntaxTrees = new List<SyntaxTree>();
             List<string> protoNames = new List<string>();
             List<string> protoNames = new List<string>();
             foreach (string classFile in Directory.GetFiles(classPath, "*.cs"))
             foreach (string classFile in Directory.GetFiles(classPath, "*.cs"))