mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 08:23:05 -05:00
tst: memfs: GetSecurityByName: fix FileAttributes for streams on directories
This commit is contained in:
parent
860e9db8a7
commit
7e1861a9f5
@ -418,12 +418,19 @@ static NTSTATUS GetSecurityByName(FSP_FILE_SYSTEM *FileSystem,
|
||||
}
|
||||
|
||||
#if defined(MEMFS_NAMED_STREAMS)
|
||||
UINT32 FileAttributesMask = ~0;
|
||||
if (0 != FileNode->MainFileNode)
|
||||
{
|
||||
FileAttributesMask = ~FILE_ATTRIBUTE_DIRECTORY;
|
||||
FileNode = FileNode->MainFileNode;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (0 != PFileAttributes)
|
||||
*PFileAttributes = FileNode->FileInfo.FileAttributes & FileAttributesMask;
|
||||
#else
|
||||
if (0 != PFileAttributes)
|
||||
*PFileAttributes = FileNode->FileInfo.FileAttributes;
|
||||
#endif
|
||||
|
||||
if (0 != PSecurityDescriptorSize)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user