summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qnoncontiguousbytedevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/io/qnoncontiguousbytedevice.cpp')
-rw-r--r--src/corelib/io/qnoncontiguousbytedevice.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qnoncontiguousbytedevice.cpp b/src/corelib/io/qnoncontiguousbytedevice.cpp
index 2bac7c761c..c0fbbaf103 100644
--- a/src/corelib/io/qnoncontiguousbytedevice.cpp
+++ b/src/corelib/io/qnoncontiguousbytedevice.cpp
@@ -388,8 +388,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
return true;
}