From 95ce4f67be7a6adeafc9713e830d3dc9333bf753 Mon Sep 17 00:00:00 2001 From: Ryan SVIHLA <105286284+rsvihladremio@users.noreply.github.com> Date: Thu, 19 Sep 2024 20:52:09 +0200 Subject: [PATCH] comment fix --- pkg/archive/archive.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/archive/archive.go b/pkg/archive/archive.go index 1813403..dffc37d 100644 --- a/pkg/archive/archive.go +++ b/pkg/archive/archive.go @@ -219,7 +219,6 @@ func ExtractTarStream(reader io.Reader, dest, pathToStrip string) error { simplelog.Errorf("skipping file %v due to error %v", file, err) // any error here should fail return err - // should error here if we error on copy } for { copied, err := io.CopyN(file, tarReader, 1024) @@ -227,6 +226,7 @@ func ExtractTarStream(reader io.Reader, dest, pathToStrip string) error { if err == io.EOF { break } + // should error here if we error on copy if err := file.Close(); err != nil { simplelog.Warningf("unable to close file %v: %v", path.Clean(target), err) }