mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add if
This commit is contained in:
@@ -338,7 +338,9 @@ public class Sftp extends AbstractFtp {
|
||||
try {
|
||||
sftpATTRS = this.channel.stat(dir);
|
||||
} catch (SftpException e) {
|
||||
if (e.getMessage().contains("No such file")) {
|
||||
final String msg = e.getMessage();
|
||||
// issue#I4P9ED@Gitee
|
||||
if (msg.contains("No such file") || msg.contains("does not exist")) {
|
||||
// 文件不存在直接返回false
|
||||
// pr#378@Gitee
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user