ntdll: Also call fsync() for FD_TYPE_CHAR in NtFlushBuffersFile().

Fixes a regression introduced by
3078f10d43. Files of FD_TYPE_CHAR
were also flushed by fsync() on server before referenced commit.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Paul Gofman 2020-06-23 12:54:27 +03:00 committed by Alexandre Julliard
parent ef9d05d9c2
commit 01143089f0
1 changed files with 1 additions and 1 deletions

View File

@ -5720,7 +5720,7 @@ NTSTATUS WINAPI NtFlushBuffersFile( HANDLE handle, IO_STATUS_BLOCK *io )
if (ret == STATUS_ACCESS_DENIED)
ret = server_get_unix_fd( handle, FILE_APPEND_DATA, &fd, &needs_close, &type, NULL );
if (!ret && (type == FD_TYPE_FILE || type == FD_TYPE_DIR))
if (!ret && (type == FD_TYPE_FILE || type == FD_TYPE_DIR || type == FD_TYPE_CHAR))
{
if (fsync(fd)) ret = errno_to_status( errno );
io->u.Status = ret;