mirror of
https://github.com/pygos/pkg-utils.git
synced 2024-11-21 20:39:46 +01:00
Remove unnecessary flush from unpacking loop
The uncompressor will know when end of file is reached. Flushing prematurely won't help. Especially the way the loop was constructed, using an external buffer that is a lot larger than the internal buffer of the compressor will cause multiple erroneous flushes. Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
This commit is contained in:
parent
b30e912e97
commit
96d4d353d4
1 changed files with 0 additions and 3 deletions
|
@ -247,9 +247,6 @@ ssize_t pkg_reader_read_payload(pkg_reader_t *rd, void *out, size_t size)
|
|||
if (prefetch_compressed(rd))
|
||||
return -1;
|
||||
|
||||
if (size >= (rd->current.raw_size - rd->offset_raw))
|
||||
rd->stream->flush(rd->stream);
|
||||
|
||||
ret = rd->stream->read(rd->stream, out, size);
|
||||
if (ret < 0)
|
||||
return -1;
|
||||
|
|
Loading…
Reference in a new issue