fix FileUtil.remove bug

This commit is contained in:
Looly
2020-04-23 12:01:53 +08:00
parent 74ba64c0c0
commit 368a5e4d1c
3 changed files with 10 additions and 2 deletions

View File

@@ -238,7 +238,10 @@ public class Sftp extends AbstractFtp {
return LsEntrySelector.CONTINUE;
});
} catch (SftpException e) {
throw new JschRuntimeException(e);
if(false == StrUtil.startWithIgnoreCase(e.getMessage(), "No such file")){
throw new JschRuntimeException(e);
}
// 文件不存在忽略
}
return fileNames;
}