From 65c14240866c37f254e4b38cf54e41fbbcd68584 Mon Sep 17 00:00:00 2001 From: Li <31335418+LIlGG@users.noreply.github.com> Date: Wed, 8 Jul 2020 11:21:47 +0800 Subject: [PATCH] =?UTF-8?q?fix=20#950=20=E9=99=84=E4=BB=B6=E4=B8=8D?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E6=97=B6=E5=88=A0=E9=99=A4=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=20(#951)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/run/halo/app/handler/file/LocalFileHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/run/halo/app/handler/file/LocalFileHandler.java b/src/main/java/run/halo/app/handler/file/LocalFileHandler.java index 6e6b53634..bbfeb39b4 100644 --- a/src/main/java/run/halo/app/handler/file/LocalFileHandler.java +++ b/src/main/java/run/halo/app/handler/file/LocalFileHandler.java @@ -187,7 +187,7 @@ public class LocalFileHandler implements FileHandler { // Delete the file key try { - Files.delete(path); + Files.deleteIfExists(path); } catch (IOException e) { throw new FileOperationException("附件 " + key + " 删除失败", e); }