diff options
author | João Abecasis <joao@trolltech.com> | 2010-03-11 18:43:15 (GMT) |
---|---|---|
committer | João Abecasis <joao@trolltech.com> | 2010-03-11 18:43:15 (GMT) |
commit | 40e667739df66bf982ecdbb8e570e820264f1623 (patch) | |
tree | 7ea3dc99ab34a04043192d784294b5d6e5c424e5 /src | |
parent | 9ebbaec6fe0ac5a72da1f4fe563cd99a98696247 (diff) | |
download | Qt-40e667739df66bf982ecdbb8e570e820264f1623.zip Qt-40e667739df66bf982ecdbb8e570e820264f1623.tar.gz Qt-40e667739df66bf982ecdbb8e570e820264f1623.tar.bz2 |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qfsfileengine_win.cpp | 6 |
1 files changed, 1 insertions, 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; } |