This commit is contained in:
Kovid Goyal
2023-07-24 22:05:34 +05:30
parent a210e0c977
commit b4d8eaa0fe

View File

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