close zip files

This commit is contained in:
Michael Yang 2024-05-06 15:27:19 -07:00
parent 6694be5e50
commit b2f00aa977

View file

@ -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