mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-04 19:17:37 +08:00
* fix: 尝试修复 #2070 (#2071) * Close file after uploading it to private chat fix #2119 上传文件到私聊后,释放文件。
This commit is contained in:
parent
bad3c86912
commit
5bf64ee743
@ -617,6 +617,7 @@ func (bot *CQBot) CQUploadPrivateFile(userID int64, file, name string) global.MS
|
||||
log.Warnf("上传私聊文件 %v 失败: %+v", file, err)
|
||||
return Failed(100, "OPEN_FILE_ERROR", "打开文件失败")
|
||||
}
|
||||
defer func() { _ = fileBody.Close() }()
|
||||
localFile := &client.LocalFile{
|
||||
FileName: name,
|
||||
Body: fileBody,
|
||||
|
Loading…
x
Reference in New Issue
Block a user