From 3e4e21b4e66f85143a029374c58a66ae54f792e8 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 13 Sep 2015 17:16:07 +0200
Subject: ntdll: Return STATUS_INVALID_DEVICE_REQUEST when trying to call
 NtReadFile on directory.

---
 dlls/ntdll/file.c       | 2 +-
 dlls/ntdll/tests/file.c | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 8f89ba5..67a13b2 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -459,7 +459,7 @@ NTSTATUS FILE_GetNtStatus(void)
     case EACCES:    return STATUS_ACCESS_DENIED;
     case ENOTDIR:   return STATUS_OBJECT_PATH_NOT_FOUND;
     case ENOENT:    return STATUS_OBJECT_NAME_NOT_FOUND;
-    case EISDIR:    return STATUS_FILE_IS_A_DIRECTORY;
+    case EISDIR:    return STATUS_INVALID_DEVICE_REQUEST;
     case EMFILE:
     case ENFILE:    return STATUS_TOO_MANY_OPENED_FILES;
     case EINVAL:    return STATUS_INVALID_PARAMETER;
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index b8f1847..63dd4f9 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -206,7 +206,6 @@ static void create_file_test(void)
     U(io).Status = 0xdeadbeef;
     offset.QuadPart = 0;
     status = pNtReadFile( dir, NULL, NULL, NULL, &io, buf, sizeof(buf), &offset, NULL );
-    todo_wine
     ok( status == STATUS_INVALID_DEVICE_REQUEST || status == STATUS_PENDING, "NtReadFile error %08x\n", status );
     if (status == STATUS_PENDING)
     {
-- 
2.6.0

