Ver Fonte

修复文件写出问题

zhouhao há 6 anos atrás
pai
commit
4232fd355e

+ 2 - 1
hsweb-system/hsweb-system-dev-tools/src/main/java/org/hswebframework/web/dev/tools/writer/DefaultCodeWriter.java

@@ -21,7 +21,8 @@ public class DefaultCodeWriter implements CodeWriter {
         File file = new File(path);
         file.mkdir();
         String type = code.getType();
-        String filePath = code.getFile().startsWith("/") ? code.getFile() : path + "/" + code.getFile();
+
+        String filePath = code.getFile();
         if ("dir".equals(type)) {
             code.getChildren()
                     .forEach(childrenCode -> writeCode(filePath, childrenCode));