tar/asm: comment on error

This commit is contained in:
Vincent Batts 2015-03-03 14:27:37 -05:00
parent d55695834a
commit 686addad77
1 changed files with 3 additions and 0 deletions

View File

@ -52,6 +52,9 @@ func NewOutputTarStream(fg FileGetter, up storage.Unpacker) io.ReadCloser {
break
}
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))
break
}