1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-05 03:23:49 +08:00

fix: FindFile http return nil without cache (#1832)

This commit is contained in:
linepro6 2023-01-03 21:00:42 +08:00 committed by GitHub
parent 49a8b9bd64
commit 37a8901061
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,6 +88,7 @@ func FindFile(file, cache, p string) (data []byte, err error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
return os.ReadFile(cacheFile)
case strings.HasPrefix(file, "base64"): case strings.HasPrefix(file, "base64"):
data, err = base64.StdEncoding.DecodeString(strings.TrimPrefix(file, "base64://")) data, err = base64.StdEncoding.DecodeString(strings.TrimPrefix(file, "base64://"))
if err != nil { if err != nil {