archive/iso9660: check "skip==0" before doing optimized large read
After a Seek() to an odd offset, some data needs to be skipped from the start of the block, and reading right into the given buffer doesn't work.
This commit is contained in:
parent
c58c53293c
commit
4be76f3c8f
|
@ -266,7 +266,7 @@ Iso9660InputStream::Read(std::unique_lock<Mutex> &,
|
|||
|
||||
const lsn_t read_lsn = lsn + offset / ISO_BLOCKSIZE;
|
||||
|
||||
if (read_size >= ISO_BLOCKSIZE) {
|
||||
if (read_size >= ISO_BLOCKSIZE && skip == 0) {
|
||||
/* big read - read right into the caller's buffer */
|
||||
|
||||
auto nbytes = iso->SeekRead(ptr, read_lsn,
|
||||
|
|
Loading…
Reference in New Issue