mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
commit
96233721f1
@ -294,11 +294,11 @@ public class Ftp extends AbstractFtp {
|
||||
return ListUtil.empty();
|
||||
}
|
||||
|
||||
final List<FTPFile> result = new ArrayList<>(ftpFiles.length - 2);
|
||||
final List<FTPFile> result = new ArrayList<>(ftpFiles.length - 2 <= 0 ? ftpFiles.length : ftpFiles.length - 2);
|
||||
String fileName;
|
||||
for (FTPFile ftpFile : ftpFiles) {
|
||||
fileName = ftpFile.getName();
|
||||
if (false == StrUtil.equals(".", fileName) && false == StrUtil.equals("..", fileName)) {
|
||||
if (!StrUtil.equals(".", fileName) && !StrUtil.equals("..", fileName)) {
|
||||
if (null == filter || filter.accept(ftpFile)) {
|
||||
result.add(ftpFile);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user