Merge pull request #40 from xiaohu-liu/b1

path存在多级目录的时候存在创建错误的异常,需要手动创建。
mkdir() 创建此抽象路径名称指定的目录(及只能创建一级的目录,且需要存在父目录)
mkdirs()创建此抽象路径指定的目录,包括所有必须但不存在的父目录。(及可以创建多级目录,无论是否存在父目录)
This commit is contained in:
平凡故事
2021-06-06 17:14:04 +08:00
committed by GitHub
2 changed files with 3 additions and 1 deletions

View File

@@ -44,6 +44,8 @@ public interface TypeDialect {
if (type == null || map == null || map.size() == 0) { if (type == null || map == null || map.size() == 0) {
return null; return null;
} }
type = type.toLowerCase();
if (type.startsWith("date")) { if (type.startsWith("date")) {
return map.get("date"); return map.get("date");
} }

View File

@@ -70,7 +70,7 @@ public class PojoExecute implements Execute {
} }
File pathFile = new File(path); File pathFile = new File(path);
if (!pathFile.exists()) { if (!pathFile.exists()) {
boolean mkdir = pathFile.mkdir(); boolean mkdir = pathFile.mkdirs();
if (!mkdir) { if (!mkdir) {
throw new ScrewException("create directory failed"); throw new ScrewException("create directory failed");
} }