From 290b86819311e9cfff9da562dd8b0a71d69b8d33 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 14 Mar 2023 20:42:36 +0530 Subject: [PATCH] forgot to close zip file --- tools/themes/collection.go | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/themes/collection.go b/tools/themes/collection.go index 2a24ff374..1afff8f65 100644 --- a/tools/themes/collection.go +++ b/tools/themes/collection.go @@ -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())