From 8c7aab40e2860071de2e66a2074328472e53f45f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Mon, 27 Jul 2009 17:01:50 +0200 Subject: QFSFileEngine: Don't close file if we already have a file for mapping Reviewed-by: Maurice Kalinowski --- src/corelib/io/qfsfileengine_win.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, -- cgit v0.12