diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qnoncontiguousbytedevice.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qnoncontiguousbytedevice.cpp b/src/corelib/io/qnoncontiguousbytedevice.cpp index 724ba22..72da5a8 100644 --- a/src/corelib/io/qnoncontiguousbytedevice.cpp +++ b/src/corelib/io/qnoncontiguousbytedevice.cpp @@ -389,8 +389,8 @@ bool QNonContiguousByteDeviceIoDeviceImpl::reset() { if (resetDisabled) return false; - - if (device->seek(initialPosition)) { + bool reset = (initialPosition == 0) ? device->reset() : device->seek(initialPosition); + if (reset) { eof = false; // assume eof is false, it will be true after a read has been attempted totalAdvancements = 0; //reset the progress counter if (currentReadBuffer) { |