mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
修复FileUtil.cleanEmpty无法正确清空递归空目录问题
This commit is contained in:
parent
46697f0fe9
commit
1a46b2a39e
@ -2,12 +2,13 @@
|
|||||||
# 🚀Changelog
|
# 🚀Changelog
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
# 5.8.30(2024-07-03)
|
# 5.8.30(2024-07-06)
|
||||||
|
|
||||||
### 🐣新特性
|
### 🐣新特性
|
||||||
|
|
||||||
### 🐞Bug修复
|
### 🐞Bug修复
|
||||||
* 【core 】 修复因RFC3986理解有误导致的UrlPath处理冒号转义问题(issue#IAAE88@Gitee)
|
* 【core 】 修复因RFC3986理解有误导致的UrlPath处理冒号转义问题(issue#IAAE88@Gitee)
|
||||||
|
* 【core 】 修复FileUtil.cleanEmpty无法正确清空递归空目录问题(pr#1233@Gitee)
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
# 5.8.29(2024-07-03)
|
# 5.8.29(2024-07-03)
|
||||||
|
@ -874,8 +874,8 @@ public class FileUtil extends PathUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 当前目录清除完毕,需要再次判断当前文件夹,空文件夹则删除之
|
// 当前目录清除完毕,需要再次判断当前文件夹,空文件夹则删除之
|
||||||
files = directory.listFiles();
|
String[] fileNames = directory.list();
|
||||||
if (ArrayUtil.isEmpty(files)) {
|
if (ArrayUtil.isEmpty(fileNames)) {
|
||||||
return directory.delete();
|
return directory.delete();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user