diff options
author | Gabriel de Dietrich <gabriel.dedietrich@qt.io> | 2017-07-13 16:34:32 -0700 |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dedietrich@qt.io> | 2017-07-13 16:36:10 -0700 |
commit | d38fe875c7850ca2c6ca28f91e94ae276735fac8 (patch) | |
tree | e5c92cef74e0853490d77cf0139b23f00d548a6e /src/corelib/io/qfilesystemengine_win.cpp | |
parent | ac4e848c9802377b7c4ff673180f28b9ca76b746 (diff) | |
parent | 627f0a7f7d775ecd263b95dd07fca44bfcb0c5cf (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
src/widgets/widgets/qmainwindowlayout.cpp
Change-Id: I306b4f5ad11bceb336c9091241b468d455fe6bb6
Diffstat (limited to 'src/corelib/io/qfilesystemengine_win.cpp')
-rw-r--r-- | src/corelib/io/qfilesystemengine_win.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/io/qfilesystemengine_win.cpp b/src/corelib/io/qfilesystemengine_win.cpp index d95a6de777..889fbfea7b 100644 --- a/src/corelib/io/qfilesystemengine_win.cpp +++ b/src/corelib/io/qfilesystemengine_win.cpp @@ -602,13 +602,13 @@ QByteArray QFileSystemEngine::id(const QFileSystemEntry &entry) QByteArray result; const HANDLE handle = #ifndef Q_OS_WINRT - CreateFile((wchar_t*)entry.nativeFilePath().utf16(), GENERIC_READ, + CreateFile((wchar_t*)entry.nativeFilePath().utf16(), 0, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); #else // !Q_OS_WINRT - CreateFile2((const wchar_t*)entry.nativeFilePath().utf16(), GENERIC_READ, + CreateFile2((const wchar_t*)entry.nativeFilePath().utf16(), 0, FILE_SHARE_READ, OPEN_EXISTING, NULL); #endif // Q_OS_WINRT - if (handle) { + if (handle != INVALID_HANDLE_VALUE) { result = QOperatingSystemVersion::current() >= QOperatingSystemVersion::Windows8 ? fileIdWin8(handle) : fileId(handle); CloseHandle(handle); |