diff --git a/metainfo/info.go b/metainfo/info.go index 77cb9eba..22aca56f 100644 --- a/metainfo/info.go +++ b/metainfo/info.go @@ -76,8 +76,8 @@ func (info *Info) writeFiles(w io.Writer, open func(fi FileInfo) (io.ReadCloser, } wn, err := io.CopyN(w, r, fi.Length) r.Close() - if wn != fi.Length || err != nil { - return fmt.Errorf("error hashing %v: %s", fi, err) + if wn != fi.Length { + return fmt.Errorf("error copying %v: %s", fi, err) } } return nil