mirror of
https://github.com/vbatts/tar-split.git
synced 2024-12-23 05:46:30 +00:00
tar/asm: don't add a padding entry if it has no bytes
Fixes #65 if the read bytes is 0, then don't even create the entry for that padding. This sounds like the solution for the issue opened, but I haven't found a reproducer for this issue yet. :-\ Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
cad1f451fd
commit
b6372414e5
1 changed files with 3 additions and 0 deletions
|
@ -135,6 +135,9 @@ func NewInputTarStream(r io.Reader, p storage.Packer, fp storage.FilePutter) (io
|
|||
}
|
||||
isEOF = true
|
||||
}
|
||||
if n == 0 {
|
||||
break
|
||||
}
|
||||
_, err = p.AddEntry(storage.Entry{
|
||||
Type: storage.SegmentType,
|
||||
Payload: paddingChunk[:n],
|
||||
|
|
Loading…
Reference in a new issue