ntdll: Fix NtFlushBuffersFile() for files with FILE_APPEND_DATA access.
Fixes a regression introduced by commit
f7d40d45da
.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a0aac49591
commit
c530fb9e28
|
@ -3418,6 +3418,8 @@ NTSTATUS WINAPI NtFlushBuffersFile( HANDLE hFile, IO_STATUS_BLOCK* IoStatusBlock
|
|||
int fd, needs_close;
|
||||
|
||||
ret = server_get_unix_fd( hFile, FILE_WRITE_DATA, &fd, &needs_close, &type, NULL );
|
||||
if (ret == STATUS_ACCESS_DENIED)
|
||||
ret = server_get_unix_fd( hFile, FILE_APPEND_DATA, &fd, &needs_close, &type, NULL );
|
||||
|
||||
if (!ret && type == FD_TYPE_SERIAL)
|
||||
{
|
||||
|
|
|
@ -4441,7 +4441,6 @@ static void test_flush_buffers_file(void)
|
|||
ok(hfile != INVALID_HANDLE_VALUE, "could not open temp file, error %d.\n", GetLastError());
|
||||
|
||||
status = pNtFlushBuffersFile(hfile, &io_status_block);
|
||||
todo_wine
|
||||
ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#x.\n", status);
|
||||
|
||||
CloseHandle(hfile);
|
||||
|
|
Loading…
Reference in New Issue