From f771d361aea8b5cfb6efb36936984208c71f2004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E9=9B=84?= Date: Mon, 10 Apr 2023 03:16:55 +0000 Subject: [PATCH] =?UTF-8?q?=E7=B2=BE=E7=AE=80=E5=8E=8B=E7=BC=A9=E5=8C=85?= =?UTF-8?q?=E8=A7=A3=E6=9E=90=E7=9A=84=E6=97=A0=E7=94=A8=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=20=E7=B2=BE=E7=AE=80=E5=8E=8B=E7=BC=A9=E5=8C=85=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E7=9A=84=E6=97=A0=E7=94=A8=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 高雄 --- .../main/java/cn/keking/web/controller/FileController.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/server/src/main/java/cn/keking/web/controller/FileController.java b/server/src/main/java/cn/keking/web/controller/FileController.java index 3aea49f3..549c6f0a 100644 --- a/server/src/main/java/cn/keking/web/controller/FileController.java +++ b/server/src/main/java/cn/keking/web/controller/FileController.java @@ -140,7 +140,7 @@ public class FileController { */ private ReturnResponse deleteFileCheck(String fileName) { if (ObjectUtils.isEmpty(fileName)) { - return ReturnResponse.failure("文件名为空!"); + return ReturnResponse.failure("文件名为空,删除失败!"); } try { fileName = WebUtils.decodeUrl(fileName); @@ -160,10 +160,6 @@ public class FileController { @GetMapping("/directory") public Object directory(String urls) { - ReturnResponse checkResult = this.deleteFileCheck(urls); - if (checkResult.isFailure()) { - return checkResult; - } String fileUrl; try { fileUrl = WebUtils.decodeUrl(urls);