Skip to content

Commit

Permalink
ntdll: Also call fsync() for FD_TYPE_CHAR in NtFlushBuffersFile().
Browse files Browse the repository at this point in the history
Fixes a regression introduced by
3078f10. 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>
  • Loading branch information
Paul Gofman authored and julliard committed Jun 23, 2020
1 parent ef9d05d commit 0114308
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dlls/ntdll/unix/file.c
Expand Up @@ -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;
Expand Down

0 comments on commit 0114308

Please sign in to comment.