mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-12-06 17:18:54 +08:00
修复FileUtil.listFileNames相对路径index混乱问题(issue#4121@Github)
This commit is contained in:
parent
62f04b2c0d
commit
3b15ae08ae
11
CHANGELOG.md
11
CHANGELOG.md
@ -11,11 +11,12 @@
|
||||
|
||||
### 🐞Bug修复
|
||||
* 【jwt 】 修复verify方法在定义alg为`none`时验证失效问题(issue#4105@Github)
|
||||
* 【extra 】 修复`JschSessionPool.remove`逻辑错误问题。
|
||||
* 【db 】 修复`Dialect.psForCount`未传入Wrapper导致大小写问题(issue#ID39G9@Gitee)。
|
||||
* 【core 】 修复`PasswdStrength.check`indexOf逻辑问题(pr#4114@Github)。
|
||||
* 【http 】 修复`HttpConnection.reflectSetMethod`反射在JDK9+权限问题(issue#4109@Github)。
|
||||
* 【http 】 修复`JsonUtil.toJsonStr`对Boolean和Number返回错误问题(issue#4109@Github)。
|
||||
* 【extra 】 修复`JschSessionPool.remove`逻辑错误问题
|
||||
* 【db 】 修复`Dialect.psForCount`未传入Wrapper导致大小写问题(issue#ID39G9@Gitee)
|
||||
* 【core 】 修复`PasswdStrength.check`indexOf逻辑问题(pr#4114@Github)
|
||||
* 【http 】 修复`HttpConnection.reflectSetMethod`反射在JDK9+权限问题(issue#4109@Github)
|
||||
* 【http 】 修复`JsonUtil.toJsonStr`对Boolean和Number返回错误问题(issue#4109@Github)
|
||||
* 【core 】 修复`FileUtil.listFileNames`相对路径index混乱问题(issue#4121@Github)
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
# 5.8.41(2025-10-12)
|
||||
|
||||
@ -240,6 +240,7 @@ public class FileUtil extends PathUtil {
|
||||
if (path == null) {
|
||||
return new ArrayList<>(0);
|
||||
}
|
||||
path = getAbsolutePath(path);
|
||||
int index = path.lastIndexOf(FileUtil.JAR_PATH_EXT);
|
||||
if (index < 0) {
|
||||
// 普通目录
|
||||
@ -253,8 +254,6 @@ public class FileUtil extends PathUtil {
|
||||
return paths;
|
||||
}
|
||||
|
||||
// jar文件
|
||||
path = getAbsolutePath(path);
|
||||
// jar文件中的路径
|
||||
index = index + FileUtil.JAR_FILE_EXT.length();
|
||||
JarFile jarFile = null;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user