forgot to close zip file

This commit is contained in:
Kovid Goyal
2023-03-14 20:42:36 +05:30
parent c19ac531cf
commit 290b868193

View File

@@ -424,6 +424,7 @@ func fetch_cached(name, url, cache_path string, max_cache_age time.Duration) (st
if err != nil {
return "", fmt.Errorf("Failed to open downloaded zip file with error: %w", err)
}
defer r.Close()
w := zip.NewWriter(tf2)
jm.Etag = resp.Header.Get("ETag")
jm.Timestamp = utils.ISO8601Format(time.Now())