This commit is contained in:
looly
2022-01-04 17:36:07 +08:00
parent a3b9b0ac6b
commit c28a202c14
2 changed files with 4 additions and 1 deletions

View File

@@ -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;