Skip to content

Commit 3e5e5b4

Browse files
authored
Merge pull request containerd#10471 from colinodell/include-path-in-error
Include file path in tar copy errors
2 parents ca6a8a5 + c8254df commit 3e5e5b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/archive/tar.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ func (cw *ChangeWriter) HandleChange(k fs.ChangeKind, p string, f os.FileInfo, e
666666

667667
n, err := copyBuffered(context.TODO(), cw.tw, file)
668668
if err != nil {
669-
return fmt.Errorf("failed to copy: %w", err)
669+
return fmt.Errorf("failed to copy: %v: %w", source, err)
670670
}
671671
if n != hdr.Size {
672672
return errors.New("short write copying file")

0 commit comments

Comments
 (0)