ntdll: Add support for root directory in NtCreateFile for Win32 file objects.

This commit is contained in:
Alexandre Julliard 2008-11-11 11:40:08 +01:00
parent 66d893b0f9
commit f96670cb5f
2 changed files with 4 additions and 11 deletions

View File

@ -158,16 +158,9 @@ NTSTATUS WINAPI NtCreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATTRIB
if (alloc_size) FIXME( "alloc_size not supported\n" );
if (attr->RootDirectory)
{
FIXME( "RootDirectory %p not supported\n", attr->RootDirectory );
return STATUS_OBJECT_NAME_NOT_FOUND;
}
io->u.Status = wine_nt_to_unix_file_name( attr->ObjectName, &unix_name, disposition,
!(attr->Attributes & OBJ_CASE_INSENSITIVE) );
if (io->u.Status == STATUS_BAD_DEVICE_TYPE)
if (attr->RootDirectory ||
(io->u.Status = wine_nt_to_unix_file_name( attr->ObjectName, &unix_name, disposition,
!(attr->Attributes & OBJ_CASE_INSENSITIVE) )) == STATUS_BAD_DEVICE_TYPE)
{
SERVER_START_REQ( open_file_object )
{

View File

@ -553,7 +553,7 @@ static void test_symboliclink(void)
pRtlCreateUnicodeStringFromAsciiz(&str, "test-link\\PIPE");
status = pNtOpenFile(&h, GENERIC_READ, &attr, &iosb, FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN);
todo_wine ok(status == STATUS_SUCCESS, "Failed to open NamedPipe(%08x)\n", status);
ok(status == STATUS_SUCCESS, "Failed to open NamedPipe(%08x)\n", status);
pRtlFreeUnicodeString(&str);
pNtClose(h);