Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/ntdll/tests/om.c | 2 +- dlls/ntdll/unix/sync.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c index 8912080b21d..064caddf10a 100644 --- a/dlls/ntdll/tests/om.c +++ b/dlls/ntdll/tests/om.c @@ -2574,7 +2574,7 @@ static void test_query_directory(void) status = NtQueryDirectoryObject( NULL, info, sizeof(buffer), TRUE, TRUE, &context, &size ); ok( status == STATUS_INVALID_HANDLE, "got %#lx\n", status ); ok( context == 0xdeadbeef, "got context %#lx\n", context ); - todo_wine ok( size == 0xdeadbeef || broken(!size) /* WoW64 */, "got size %lu\n", size); + ok( size == 0xdeadbeef || broken(!size) /* WoW64 */, "got size %lu\n", size);
size = 0xdeadbeef; status = NtQueryDirectoryObject( dir, info, sizeof(buffer), TRUE, TRUE, NULL, &size ); diff --git a/dlls/ntdll/unix/sync.c b/dlls/ntdll/unix/sync.c index 373afd69b2b..e1cc2d818b4 100644 --- a/dlls/ntdll/unix/sync.c +++ b/dlls/ntdll/unix/sync.c @@ -1125,11 +1125,12 @@ NTSTATUS WINAPI NtQueryDirectoryObject( HANDLE handle, DIRECTORY_BASIC_INFORMATI buffer->ObjectName.Buffer[buffer->ObjectName.Length/sizeof(WCHAR)] = 0; buffer->ObjectTypeName.Buffer[buffer->ObjectTypeName.Length/sizeof(WCHAR)] = 0; *context = index + 1; + + if (ret_size) + *ret_size = buffer->ObjectName.MaximumLength + buffer->ObjectTypeName.MaximumLength + sizeof(*buffer); } } SERVER_END_REQ; - if (ret_size) - *ret_size = buffer->ObjectName.MaximumLength + buffer->ObjectTypeName.MaximumLength + sizeof(*buffer); } else {