From 2dd03ae49023dab8947e1a59efafa2318fbf55eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E4=BF=8A?= <873019219@qq.com> Date: Sat, 10 Apr 2021 20:20:03 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=20FTP=20=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E5=9C=A8=20Linux=20=E7=8E=AF=E5=A2=83=E4=B8=8B?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=AD=A3=E5=B8=B8=E8=AF=BB=E5=8F=96=E7=9A=84?= =?UTF-8?q?=20BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/im/zhaojun/zfile/service/impl/FtpServiceImpl.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/java/im/zhaojun/zfile/service/impl/FtpServiceImpl.java b/src/main/java/im/zhaojun/zfile/service/impl/FtpServiceImpl.java index b31a437..3aff563 100644 --- a/src/main/java/im/zhaojun/zfile/service/impl/FtpServiceImpl.java +++ b/src/main/java/im/zhaojun/zfile/service/impl/FtpServiceImpl.java @@ -13,7 +13,6 @@ import im.zhaojun.zfile.service.base.BaseFileService; import im.zhaojun.zfile.util.StringUtils; import lombok.SneakyThrows; import org.apache.commons.net.ftp.FTP; -import org.apache.commons.net.ftp.FTPClientConfig; import org.apache.commons.net.ftp.FTPFile; import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.context.annotation.Scope; @@ -65,7 +64,6 @@ public class FtpServiceImpl extends AbstractBaseFileService implements BaseFileS isInitialized = false; } else { ftp = new Ftp(host, Integer.parseInt(port), username, password, StandardCharsets.UTF_8); - ftp.getClient().configure(new FTPClientConfig(FTPClientConfig.SYST_UNIX)); ftp.getClient().type(FTP.BINARY_FILE_TYPE); testConnection(); isInitialized = true; @@ -83,7 +81,6 @@ public class FtpServiceImpl extends AbstractBaseFileService implements BaseFileS ftpFiles = ftp.getClient().listFiles(fullPath); } catch (Exception e) { e.printStackTrace(); - // ignore } List fileItemList = new ArrayList<>();