mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-12-07 17:48:40 +08:00
修复Sftp递归删除目录时使用相对路径可能导致死循环的问题(pr#1380@Gitee)
This commit is contained in:
parent
0c6c959ee1
commit
aa6b1332d5
@ -2,7 +2,7 @@
|
||||
# 🚀Changelog
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
# 5.8.41(2025-09-24)
|
||||
# 5.8.41(2025-09-27)
|
||||
|
||||
### 🐣新特性
|
||||
* 【core 】 增加`WeakKeyValueConcurrentMap`及其关联类,同时废弃`WeakConcurrentMap`并替换(issue#4039@Github)
|
||||
@ -30,6 +30,7 @@
|
||||
* 【db 】 修复`NamedSql.replaceVar`关键字处理问题(issue#4062@Github)
|
||||
* 【db 】 修复`DialectRunner.count`方法中,去除包含多字段order by子句的SQL语句时错误问题(issue#4066@Github)
|
||||
* 【extra 】 修复`JschSessionPool`并发问题(pr#4079@Github)
|
||||
* 【extra 】 修复`Sftp`递归删除目录时使用相对路径可能导致死循环的问题(pr#1380@Gitee)
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
# 5.8.40(2025-08-26)
|
||||
|
||||
@ -462,8 +462,12 @@ public class Sftp extends AbstractFtp {
|
||||
fileName = entry.getFilename();
|
||||
if (false == ".".equals(fileName) && false == "..".equals(fileName)) {
|
||||
if (entry.getAttrs().isDir()) {
|
||||
// pr#1380Gitee 当目录名包含特殊字符(如 \u000b)时,会导致不断进入同一目录循环
|
||||
// 此处强制使用绝对路径
|
||||
delDir(dirPath + "/" + fileName);
|
||||
} else {
|
||||
// pr#1380Gitee 当目录名包含特殊字符(如 \u000b)时,会导致不断进入同一目录循环
|
||||
// 此处强制使用绝对路径
|
||||
delFile(dirPath + "/" + fileName);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user