Alexandre Julliard : ntdll: Add support for root directory in NtCreateFile for Win32 file objects.
Alexandre Julliard
julliard at winehq.org
Tue Nov 11 08:35:35 CST 2008
Module: wine
Branch: master
Commit: f96670cb5f8ba1eb22b9d0cc210cbd154e4667e3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f96670cb5f8ba1eb22b9d0cc210cbd154e4667e3
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Nov 11 11:40:08 2008 +0100
ntdll: Add support for root directory in NtCreateFile for Win32 file objects.
---
dlls/ntdll/file.c | 13 +++----------
dlls/ntdll/tests/om.c | 2 +-
2 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 50fa651..d04125f 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -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 )
{
diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c
index 1e4cf17..fa2642a 100644
--- a/dlls/ntdll/tests/om.c
+++ b/dlls/ntdll/tests/om.c
@@ -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);
More information about the wine-cvs
mailing list