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

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

diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index 184b7cdad59..6f830da85a2 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -171,7 +171,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)
     {
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index ca6899b50f5..d160f1a050e 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -348,7 +348,7 @@ NTSTATUS errno_to_status( int err )
     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;
-- 
2.27.0

