From 23f9444055edcaeb79fa680523800ad11671cece Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Thu, 7 Jan 2010 19:28:51 +0100 Subject: make it possible to retrieve name of the user who owns the file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QFSFileEngine::owner(OwnerUser) now works as expected Merge-request: 815 Reviewed-by: João Abecasis --- src/corelib/io/qfsfileengine_win.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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'). -- cgit v0.12