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:
Mauro
2026-06-07 14:58:21 +02:00
committed by GitHub
2 changed files with 7 additions and 1 deletions
BIN
View File
Binary file not shown.
+7 -1
View File
@@ -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,