diff --git a/fw-dalaran-server/src/main/java/cn/fw/dalaran/server/controller/app/OtherController.java b/fw-dalaran-server/src/main/java/cn/fw/dalaran/server/controller/app/OtherController.java index d641ab1..c67d45d 100644 --- a/fw-dalaran-server/src/main/java/cn/fw/dalaran/server/controller/app/OtherController.java +++ b/fw-dalaran-server/src/main/java/cn/fw/dalaran/server/controller/app/OtherController.java @@ -85,7 +85,7 @@ public class OtherController { @GetMapping("/mkdir") public Message mkdir(@NotBlank(message = "请必须指定路径") String dir, @NotNull(message = "请必须指定操作类型") Integer type) { File file = new File(dir); - boolean result = false; + Boolean result = null; String handleType = ""; if (Objects.equals(type, 1)) { handleType = "创建"; @@ -96,7 +96,7 @@ public class OtherController { if (file.exists()) result = file.delete(); } - log.info(String.format("%s文件夹, 路径为: %s, 结果为: %s", handleType, dir, result ? "成功" : "失败")); + log.info(String.format("%s文件夹, 路径为: %s, 结果为: %s", handleType, dir, Objects.isNull(result) ? "未执行" : (result ? "成功" : "失败"))); return success(result); }