diff options
author | João Abecasis <joao@trolltech.com> | 2010-03-12 15:56:54 (GMT) |
---|---|---|
committer | João Abecasis <joao@trolltech.com> | 2010-03-12 16:19:39 (GMT) |
commit | 27f3285d161912d1ae9d5f93c3860a7940be24c8 (patch) | |
tree | c7199cb67178c2754af9ea85b58f5d9340a7cb36 /src/corelib/io | |
parent | 60fca92b1f1f4a6f6c1ac8ac534650ef49af469e (diff) | |
download | Qt-27f3285d161912d1ae9d5f93c3860a7940be24c8.zip Qt-27f3285d161912d1ae9d5f93c3860a7940be24c8.tar.gz Qt-27f3285d161912d1ae9d5f93c3860a7940be24c8.tar.bz2 |
Fix QDir::entryList regression
The changes in aa235c3cf623f832c01df9a4065375ca610d4d06 introduced a
slight change in behavior where read-only files would be checked for
write-access with _waccess.
The real fix, however, is to follow what is done in doStat and
de-reference .lnk links when checking access rights.
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qfsfileengine_win.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp index 8fc73de..8d34486 100644 --- a/src/corelib/io/qfsfileengine_win.cpp +++ b/src/corelib/io/qfsfileengine_win.cpp @@ -1473,7 +1473,7 @@ QAbstractFileEngine::FileFlags QFSFileEnginePrivate::getPermissions(QAbstractFil } } else #endif - { + { //### what to do with permissions if we don't use NTFS // for now just add all permissions and what about exe missions ?? // also qt_ntfs_permission_lookup is now not set by default ... should it ? @@ -1496,11 +1496,11 @@ QAbstractFileEngine::FileFlags QFSFileEnginePrivate::getPermissions(QAbstractFil // calculate user permissions if (type & QAbstractFileEngine::ReadUserPerm) { - if (::_waccess((wchar_t*)longFileName(filePath).utf16(), R_OK) == 0) + if (::_waccess((wchar_t*)longFileName(fname).utf16(), R_OK) == 0) ret |= QAbstractFileEngine::ReadUserPerm; } if (type & QAbstractFileEngine::WriteUserPerm) { - if (::_waccess((wchar_t*)longFileName(filePath).utf16(), W_OK) == 0) + if (::_waccess((wchar_t*)longFileName(fname).utf16(), W_OK) == 0) ret |= QAbstractFileEngine::WriteUserPerm; } } |