summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoão Abecasis <joao@abecasis.name>2009-07-27 17:01:50 +0200
committerJoão Abecasis <joao@abecasis.name>2009-08-24 19:25:48 +0200
commit8c7aab40e2860071de2e66a2074328472e53f45f (patch)
treee018ee3e7ede9ed65ac3ac1e95bab2b5569625fe /src
parent2823ca13453d354911b065e018dda4d17a06f6d2 (diff)
QFSFileEngine: Don't close file if we already have a file for mapping
Reviewed-by: Maurice Kalinowski
Diffstat (limited to 'src')
-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 4a0639d8d..2d4fe0e2e 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,