From 40e667739df66bf982ecdbb8e570e820264f1623 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Thu, 11 Mar 2010 19:43:15 +0100 Subject: Fix qmake crash on Windows Introduced in aa235c3cf623f832c01df9a4065375ca610d4d06. _waccess doesn't support the X_OK mode. Instead, rely solely on the file extension as was done previously. This is also inline with what was done in QFileInfo. --- src/corelib/io/qfsfileengine_win.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp index 90f70ff..8fc73de 100644 --- a/src/corelib/io/qfsfileengine_win.cpp +++ b/src/corelib/io/qfsfileengine_win.cpp @@ -1491,7 +1491,7 @@ QAbstractFileEngine::FileFlags QFSFileEnginePrivate::getPermissions(QAbstractFil ext == QLatin1String(".exe") || ext == QLatin1String(".com") || ext == QLatin1String(".bat") || ext == QLatin1String(".pif") || ext == QLatin1String(".cmd")) { ret |= QAbstractFileEngine::ExeOwnerPerm | QAbstractFileEngine::ExeGroupPerm - | QAbstractFileEngine::ExeOtherPerm; + | QAbstractFileEngine::ExeOtherPerm | QAbstractFileEngine::ExeUserPerm; } // calculate user permissions @@ -1503,10 +1503,6 @@ QAbstractFileEngine::FileFlags QFSFileEnginePrivate::getPermissions(QAbstractFil if (::_waccess((wchar_t*)longFileName(filePath).utf16(), W_OK) == 0) ret |= QAbstractFileEngine::WriteUserPerm; } - if (type & QAbstractFileEngine::ExeUserPerm) { - if (::_waccess((wchar_t*)longFileName(filePath).utf16(), X_OK) == 0) - ret |= QAbstractFileEngine::ExeUserPerm; - } } return ret; } -- cgit v0.12