mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
Merge pull request #3034 from chengzhichao-xydt/codex/feishu-resource-close-error
fix: check Close() error on feishu resource download
This commit is contained in:
BIN
Binary file not shown.
@@ -1013,7 +1013,13 @@ func (c *FeishuChannel) storeResourceFile(
|
||||
})
|
||||
return ""
|
||||
}
|
||||
out.Close()
|
||||
if closeErr := out.Close(); closeErr != nil {
|
||||
logger.ErrorCF("feishu", "Failed to close downloaded resource file", map[string]any{
|
||||
"error": closeErr.Error(),
|
||||
})
|
||||
os.Remove(localPath)
|
||||
return ""
|
||||
}
|
||||
|
||||
ref, err := store.Store(localPath, media.MediaMeta{
|
||||
Filename: filename,
|
||||
|
||||
Reference in New Issue
Block a user