summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRitt Konstantin <ritt.ks@gmail.com>2010-01-07 18:28:51 (GMT)
committerJoão Abecasis <joao@trolltech.com>2010-01-07 18:30:27 (GMT)
commit23f9444055edcaeb79fa680523800ad11671cece (patch)
tree1a927ae8aaa691eb44d0d034397022d1931e22fe
parenta010d26629e8aa5aaa14a7e57ace06708fc903d6 (diff)
downloadQt-23f9444055edcaeb79fa680523800ad11671cece.zip
Qt-23f9444055edcaeb79fa680523800ad11671cece.tar.gz
Qt-23f9444055edcaeb79fa680523800ad11671cece.tar.bz2
make it possible to retrieve name of the user who owns the file
QFSFileEngine::owner(OwnerUser) now works as expected Merge-request: 815 Reviewed-by: João Abecasis <joao@trolltech.com>
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp
index d8b6b00..1c0d5cf 100644
--- a/src/corelib/io/qfsfileengine_win.cpp
+++ b/src/corelib/io/qfsfileengine_win.cpp
@@ -1731,7 +1731,8 @@ QString QFSFileEngine::owner(FileOwner own) const
if(ptrGetNamedSecurityInfoW && ptrLookupAccountSidW) {
if(ptrGetNamedSecurityInfoW((wchar_t*)d->filePath.utf16(), SE_FILE_OBJECT,
own == OwnerGroup ? GROUP_SECURITY_INFORMATION : OWNER_SECURITY_INFORMATION,
- NULL, &pOwner, NULL, NULL, &pSD) == ERROR_SUCCESS) {
+ own == OwnerUser ? &pOwner : 0, own == OwnerGroup ? &pOwner : 0,
+ 0, 0, &pSD) == ERROR_SUCCESS) {
DWORD lowner = 0, ldomain = 0;
SID_NAME_USE use;
// First call, to determine size of the strings (with '\0').