From 27f3285d161912d1ae9d5f93c3860a7940be24c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Fri, 12 Mar 2010 16:56:54 +0100 Subject: 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. --- src/corelib/io/qfsfileengine_win.cpp | 6 +++--- 1 file 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; } } -- cgit v0.12