From 7c2ce939810a190edd76a2596e0c2bf1ef11b659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Sun, 8 Dec 2019 18:39:24 +0100 Subject: [PATCH] Close files in ExtractTar --- lib/tarutil/systar.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/tarutil/systar.go b/lib/tarutil/systar.go index d5214108e..67a87d321 100644 --- a/lib/tarutil/systar.go +++ b/lib/tarutil/systar.go @@ -38,6 +38,10 @@ func ExtractTar(body io.Reader, dir string) error { if _, err := io.Copy(f, tr); err != nil { return err } + + if err := f.Close(); err != nil { + return err + } } }