1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-04 19:17:37 +08:00

Merge pull request #1022 from asjdf/master

update fs.go
This commit is contained in:
Mrs4s 2021-08-28 19:46:16 +08:00 committed by GitHub
commit 16db68e054
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -37,6 +37,8 @@ go-cqhttp版本:
连接方式:
使用协议:
**在最新的release版本中能否复现**
**bug内容**
<!-- 请在这里详细描述bug的内容 -->

View File

@ -45,7 +45,7 @@ var (
// PathExists 判断给定path是否存在
func PathExists(path string) bool {
_, err := os.Stat(path)
return err == nil || os.IsExist(err)
return err == nil || errors.Is(err, os.ErrExist)
}
// ReadAllText 读取给定path对应文件无法读取时返回空值