1
0
Fork 0
forked from mirrors/tar-split

tar/asm: comment on error

This commit is contained in:
Vincent Batts 2015-03-03 14:27:37 -05:00
parent d55695834a
commit 686addad77

View file

@ -52,6 +52,9 @@ func NewOutputTarStream(fg FileGetter, up storage.Unpacker) io.ReadCloser {
break break
} }
if !bytes.Equal(c.Sum(nil), entry.Payload) { if !bytes.Equal(c.Sum(nil), entry.Payload) {
// I would rather this be a comparable ErrInvalidChecksum or such,
// but since it's coming through the PipeReader, the context of
// _which_ file would be lost...
pw.CloseWithError(fmt.Errorf("file integrity checksum failed for %q", entry.Name)) pw.CloseWithError(fmt.Errorf("file integrity checksum failed for %q", entry.Name))
break break
} }