Skip to content

Commit

Permalink
close zip files
Browse files Browse the repository at this point in the history
  • Loading branch information
mxyng committed May 6, 2024
1 parent 6694be5 commit b2f00aa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,13 @@ func parseFromZipFile(_ context.Context, file *os.File, fn func(api.ProgressResp
if err != nil {
return nil, err
}
defer outfile.Close()

infile, err := f.Open()
if err != nil {
return nil, err
}
defer infile.Close()

if _, err = io.Copy(outfile, infile); err != nil {
return nil, err
Expand Down

0 comments on commit b2f00aa

Please sign in to comment.