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