This commit is contained in:
Kovid Goyal 2023-07-24 22:05:34 +05:30
parent a210e0c977
commit b4d8eaa0fe
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -55,9 +55,11 @@ func NewStreamDecompressor(constructor func(io.Reader) (io.ReadCloser, error), o
if iter_err != nil {
return iter_err
}
_, iter_err = pipe_w.Write(chunk)
if iter_err != nil {
return iter_err
if len(chunk) > 0 {
_, iter_err = pipe_w.Write(chunk)
if iter_err != nil {
return iter_err
}
}
if is_last {
pipe_w.CloseWithError(io.EOF)