summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorJoão Abecasis <joao@abecasis.name>2009-07-27 15:01:50 (GMT)
committerJoão Abecasis <joao@abecasis.name>2009-08-24 17:25:48 (GMT)
commit8c7aab40e2860071de2e66a2074328472e53f45f (patch)
treee018ee3e7ede9ed65ac3ac1e95bab2b5569625fe /src/corelib/io
parent2823ca13453d354911b065e018dda4d17a06f6d2 (diff)
downloadQt-8c7aab40e2860071de2e66a2074328472e53f45f.zip
Qt-8c7aab40e2860071de2e66a2074328472e53f45f.tar.gz
Qt-8c7aab40e2860071de2e66a2074328472e53f45f.tar.bz2
QFSFileEngine: Don't close file if we already have a file for mapping
Reviewed-by: Maurice Kalinowski
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp
index 4a0639d..2d4fe0e 100644
--- a/src/corelib/io/qfsfileengine_win.cpp
+++ b/src/corelib/io/qfsfileengine_win.cpp
@@ -1929,8 +1929,8 @@ uchar *QFSFileEnginePrivate::map(qint64 offset, qint64 size,
handle = (HANDLE)_get_osfhandle(QT_FILENO(fh));
#else
#ifdef Q_USE_DEPRECATED_MAP_API
- nativeClose();
if (fileMapHandle == INVALID_HANDLE_VALUE) {
+ nativeClose();
fileMapHandle = CreateFileForMapping((const wchar_t*)nativeFilePath.constData(),
GENERIC_READ | (openMode & QIODevice::WriteOnly ? GENERIC_WRITE : 0),
0,