Merge pull request #10471 from colinodell/include-path-in-error

Include file path in tar copy errors
This commit is contained in:
Kazuyoshi Kato
2024-07-16 17:02:13 +00:00
committed by GitHub

View File

@@ -666,7 +666,7 @@ func (cw *ChangeWriter) HandleChange(k fs.ChangeKind, p string, f os.FileInfo, e
n, err := copyBuffered(context.TODO(), cw.tw, file)
if err != nil {
return fmt.Errorf("failed to copy: %w", err)
return fmt.Errorf("failed to copy: %v: %w", source, err)
}
if n != hdr.Size {
return errors.New("short write copying file")