mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix Sftp bug
This commit is contained in:
parent
79e7fe93f6
commit
cef68b6bde
@ -13,6 +13,7 @@
|
||||
* 【core 】 修复createScheduledExecutor单位不是毫秒的问题(issue#I3OYIW@Gitee)
|
||||
* 【core 】 修复Tailer无stop问题(issue#I3PQLQ@Gitee)
|
||||
* 【core 】 修复空白excel读取报错问题(issue#1552@Github)
|
||||
* 【extra 】 修复Sftp.mkDirs报错问题(issue#1536@Github)
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -130,7 +130,15 @@ public abstract class AbstractFtp implements Closeable {
|
||||
}
|
||||
for (String s : dirs) {
|
||||
if (StrUtil.isNotEmpty(s)) {
|
||||
if (false == cd(s)) {
|
||||
boolean exist = true;
|
||||
try{
|
||||
if (false == cd(s)) {
|
||||
exist = false;
|
||||
}
|
||||
} catch (FtpException e){
|
||||
exist = false;
|
||||
}
|
||||
if(false == exist){
|
||||
//目录不存在时创建
|
||||
mkdir(s);
|
||||
cd(s);
|
||||
|
Loading…
x
Reference in New Issue
Block a user