feat:日志管理切换工作路径后设置被动模式
This commit is contained in:
parent
9c7be4c981
commit
1ff408dcb6
|
@ -117,6 +117,7 @@ public class FTPUtil {
|
|||
ftpClient.changeWorkingDirectory(workPath);
|
||||
}
|
||||
}
|
||||
ftpClient.enterLocalPassiveMode();
|
||||
ftpClient.setFileType(FTPClient.BINARY_FILE_TYPE);
|
||||
// 设置编码,当文件中存在中文且上传后文件乱码时可使用此配置项
|
||||
ftpClient.setControlEncoding(encoding);
|
||||
|
|
|
@ -40,6 +40,7 @@ public class LogManageController {
|
|||
}
|
||||
//切换工作文件路径
|
||||
ftpClient.changeWorkingDirectory(workPath);
|
||||
ftpClient.enterLocalPassiveMode();
|
||||
List<FTPFile> ftpFiles = Arrays.asList(ftpClient.listDirectories());
|
||||
if (CollectionUtils.isNotEmpty(ftpFiles)){
|
||||
int num =1;
|
||||
|
@ -122,6 +123,7 @@ public class LogManageController {
|
|||
ftpClient.changeWorkingDirectory(workPath);
|
||||
}
|
||||
}
|
||||
ftpClient.enterLocalPassiveMode();
|
||||
List<FTPFile> ftpFiles = Arrays.asList(ftpClient.listFiles());
|
||||
if (CollectionUtils.isNotEmpty(ftpFiles)){
|
||||
for (FTPFile ftpFile:ftpFiles) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user