From df08cb70906abce38cd54fb38f5b349424bd31a9 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Thu, 6 Oct 2011 13:46:30 +0100 Subject: [PATCH] Fix incorrect QFileInfo permissions on windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Requesting the write permission marked the read permission as known without having retrieved it. A subsequent request for read permission would return false. Task-Number: QTBUG-20714 Reviewed-By: mread (cherry picked from commit bf69c7e0af67ec877da4fee244386e538fa1c01d) Change-Id: I74fd118fcdd3b222098eda2718823a36931424a1 Reviewed-on: http://codereview.qt-project.org/6159 Reviewed-by: Qt Sanity Bot Reviewed-by: João Abecasis --- src/corelib/io/qfilesystemengine_win.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp index df34184091..2223d92438 100644 --- a/src/corelib/io/qfilesystemengine_win.cpp +++ b/src/corelib/io/qfilesystemengine_win.cpp @@ -692,7 +692,7 @@ bool QFileSystemEngine::fillPermissions(const QFileSystemEntry &entry, QFileSyst if (what & QFileSystemMetaData::UserWritePermission) { if (::_waccess((wchar_t*)entry.nativeFilePath().utf16(), W_OK) == 0) data.entryFlags |= QFileSystemMetaData::UserWritePermission; - data.knownFlagsMask |= QFileSystemMetaData::UserReadPermission; + data.knownFlagsMask |= QFileSystemMetaData::UserWritePermission; } }