Skip to content

Commit

Permalink
comment fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rsvihladremio committed Sep 19, 2024
1 parent 2c08789 commit 95ce4f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/archive/archive.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,14 @@ 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)
if err != nil {
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)
}
Expand Down

0 comments on commit 95ce4f6

Please sign in to comment.