1
0
mirror of https://gitee.com/dromara/hutool.git synced 2025-04-05 17:37:59 +08:00

修复FileUtil.cleanEmpty无法正确清空递归空目录问题

This commit is contained in:
Looly 2024-07-06 10:37:43 +08:00
parent 46697f0fe9
commit 1a46b2a39e
2 changed files with 4 additions and 3 deletions
CHANGELOG.md
hutool-core/src/main/java/cn/hutool/core/io

View File

@ -2,12 +2,13 @@
# 🚀Changelog
-------------------------------------------------------------------------------------------------------------
# 5.8.30(2024-07-03)
# 5.8.30(2024-07-06)
### 🐣新特性
### 🐞Bug修复
* 【core 】 修复因RFC3986理解有误导致的UrlPath处理冒号转义问题issue#IAAE88@Gitee
* 【core 】 修复FileUtil.cleanEmpty无法正确清空递归空目录问题pr#1233@Gitee
-------------------------------------------------------------------------------------------------------------
# 5.8.29(2024-07-03)

View File

@ -874,8 +874,8 @@ public class FileUtil extends PathUtil {
}
// 当前目录清除完毕需要再次判断当前文件夹空文件夹则删除之
files = directory.listFiles();
if (ArrayUtil.isEmpty(files)) {
String[] fileNames = directory.list();
if (ArrayUtil.isEmpty(fileNames)) {
return directory.delete();
}
return true;