1
0
Fork 1
mirror of https://github.com/vbatts/tar-split.git synced 2024-12-18 11:36:30 +00:00

Merge pull request #34 from dmcgowan/fix-panic-issue-33

Fix panic in Next
This commit is contained in:
Vincent Batts 2016-09-23 09:41:12 -04:00 committed by GitHub
commit ae8540dc47

View file

@ -611,7 +611,8 @@ func (tr *Reader) readHeader() *Header {
if _, tr.err = io.ReadFull(tr.r, header); tr.err != nil {
// because it could read some of the block, but reach EOF first
if tr.err == io.EOF && tr.RawAccounting {
if _, tr.err = tr.rawBytes.Write(header); tr.err != nil {
if _, err := tr.rawBytes.Write(header); err != nil {
tr.err = err
return nil
}
}