Include filename in error

Signed-off-by: Colin O'Dell <colinodell@gmail.com>
This commit is contained in:
Colin O'Dell 2024-07-16 11:04:48 -04:00 committed by Colin O'Dell
parent ca6a8a56a5
commit c8254dfae9
No known key found for this signature in database
GPG Key ID: 60A4DAD272A01CB8

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) n, err := copyBuffered(context.TODO(), cw.tw, file)
if err != nil { 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 { if n != hdr.Size {
return errors.New("short write copying file") return errors.New("short write copying file")