mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix Sftp bug
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user