summaryrefslogtreecommitdiff
path: root/src/corelib/io/qfsfileengine_win.cpp
diff options
context:
space:
mode:
authorJoão Abecasis <joao@trolltech.com>2010-03-12 16:56:54 +0100
committerJoão Abecasis <joao@trolltech.com>2010-03-12 17:19:39 +0100
commit27f3285d161912d1ae9d5f93c3860a7940be24c8 (patch)
treec7199cb67178c2754af9ea85b58f5d9340a7cb36 /src/corelib/io/qfsfileengine_win.cpp
parent60fca92b1f1f4a6f6c1ac8ac534650ef49af469e (diff)
downloadqt4-tools-27f3285d161912d1ae9d5f93c3860a7940be24c8.tar.gz
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/qfsfileengine_win.cpp')
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp
index 8fc73def56..8d344867d8 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;
}
}