From 42af271526833740bcebadd700da1e67ef48003c Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Sat, 17 Feb 2024 23:05:18 +0530 Subject: [PATCH] Close body of file after writing to zip file in export (#5234) --- #### Does this PR need a docs update or release note? - [ ] :white_check_mark: Yes, it's included - [ ] :clock1: Yes, but in a later PR - [x] :no_entry: No #### Type of change - [ ] :sunflower: Feature - [x] :bug: Bugfix - [ ] :world_map: Documentation - [ ] :robot: Supportability/Tests - [ ] :computer: CI/Deployment - [ ] :broom: Tech Debt/Cleanup #### Issue(s) * # #### Test Plan - [ ] :muscle: Manual - [ ] :zap: Unit test - [ ] :green_heart: E2E --- src/internal/archive/zip.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/internal/archive/zip.go b/src/internal/archive/zip.go index 3aaa54510..c214a77cd 100644 --- a/src/internal/archive/zip.go +++ b/src/internal/archive/zip.go @@ -99,6 +99,8 @@ func ZipExportCollection( writer.CloseWithError(clues.Wrap(err, "writing zip entry").With("name", name).With("id", item.ID)) return } + + item.Body.Close() } }