mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
add if
This commit is contained in:
parent
a3b9b0ac6b
commit
c28a202c14
@ -11,6 +11,7 @@
|
|||||||
* 【core 】 CharSequenceUtil.replace方法支持增补字符(pr#2041@Github)
|
* 【core 】 CharSequenceUtil.replace方法支持增补字符(pr#2041@Github)
|
||||||
* 【extra 】 增加SshjSftp(pr#493@Gitee)
|
* 【extra 】 增加SshjSftp(pr#493@Gitee)
|
||||||
* 【core 】 增加CheckedUtil(pr#491@Gitee)
|
* 【core 】 增加CheckedUtil(pr#491@Gitee)
|
||||||
|
* 【extra 】 增加Sftp.isDir中的抛异常判断条件(issues#I4P9ED@Gitee)
|
||||||
|
|
||||||
### 🐞Bug修复
|
### 🐞Bug修复
|
||||||
* 【http 】 HttpUtil重定向次数失效问题(issue#I4O28Q@Gitee)
|
* 【http 】 HttpUtil重定向次数失效问题(issue#I4O28Q@Gitee)
|
||||||
|
@ -338,7 +338,9 @@ public class Sftp extends AbstractFtp {
|
|||||||
try {
|
try {
|
||||||
sftpATTRS = this.channel.stat(dir);
|
sftpATTRS = this.channel.stat(dir);
|
||||||
} catch (SftpException e) {
|
} 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
|
// 文件不存在直接返回false
|
||||||
// pr#378@Gitee
|
// pr#378@Gitee
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user