mirror of
https://github.com/vbatts/tar-split.git
synced 2024-12-22 21:36:30 +00:00
Merge pull request #68 from mtrmac/read-0-nil
Correctly handle Read returning (0, nil)
This commit is contained in:
commit
5ef0dd8243
1 changed files with 9 additions and 10 deletions
|
@ -135,16 +135,15 @@ func NewInputTarStream(r io.Reader, p storage.Packer, fp storage.FilePutter) (io
|
||||||
}
|
}
|
||||||
isEOF = true
|
isEOF = true
|
||||||
}
|
}
|
||||||
if n == 0 {
|
if n != 0 {
|
||||||
break
|
_, err = p.AddEntry(storage.Entry{
|
||||||
}
|
Type: storage.SegmentType,
|
||||||
_, err = p.AddEntry(storage.Entry{
|
Payload: paddingChunk[:n],
|
||||||
Type: storage.SegmentType,
|
})
|
||||||
Payload: paddingChunk[:n],
|
if err != nil {
|
||||||
})
|
pW.CloseWithError(err)
|
||||||
if err != nil {
|
return
|
||||||
pW.CloseWithError(err)
|
}
|
||||||
return
|
|
||||||
}
|
}
|
||||||
if isEOF {
|
if isEOF {
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in a new issue