From 686addad772e112c459f7101d1b9f0a82fb7dc2f Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Tue, 3 Mar 2015 14:27:37 -0500 Subject: [PATCH] tar/asm: comment on error --- tar/asm/assemble.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tar/asm/assemble.go b/tar/asm/assemble.go index b0804da..fed65fc 100644 --- a/tar/asm/assemble.go +++ b/tar/asm/assemble.go @@ -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 }