fix: deleting a non-picture file throws an exception. (#1438)

* fix: deleting a non-picture file throws an exception.

#1437

* doc: update CHANGELOG.md
pull/1440/head
Ryan Wang 2021-07-24 12:05:52 +08:00 committed by GitHub
parent 97941e37c1
commit 45ce44693d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,8 @@
## Bug Fixes
- 修复 Content Api 中文章列表接口的 `keyword``categoryId` 参数为必传的问题。
- 修复 Content Api 中文章列表接口的 `keyword``categoryId` 参数为必传的问题。halo-dev/halo#1436
- 修复删除非图片附件时提示附件缩略图删除失败的问题。halo-dev/halo#1438
# 1.4.10

View File

@ -194,7 +194,6 @@ public class LocalFileHandler implements FileHandler {
boolean deleteResult = Files.deleteIfExists(thumbnailPath);
if (!deleteResult) {
log.warn("Thumbnail: [{}] may not exist", thumbnailPath.toString());
throw new FileOperationException("附件缩略图 " + thumbnailName + " 删除失败");
}
} catch (IOException e) {
throw new FileOperationException("附件缩略图 " + thumbnailName + " 删除失败", e);