ntdll: Return STATUS_INVALID_DEVICE_REQUEST when trying to call NtReadFile on directory.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 43de1407e9)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
This commit is contained in:
Sebastian Lackner 2021-02-04 18:05:00 -06:00 committed by Michael Stefaniuc
parent 1abbaaa221
commit 717e8d5366
2 changed files with 1 additions and 2 deletions

View File

@ -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)
{

View File

@ -344,7 +344,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;