Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/kernel32/path.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c index a389743171..6d2a9029b9 100644 --- a/dlls/kernel32/path.c +++ b/dlls/kernel32/path.c @@ -1283,6 +1283,7 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest, NTSTATUS status; HANDLE source_handle = 0, dest_handle; ANSI_STRING source_unix, dest_unix; + DWORD options;
TRACE("(%s,%s,%p,%p,%04x)\n", debugstr_w(source), debugstr_w(dest), fnProgress, param, flag ); @@ -1293,9 +1294,6 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest, if (!dest) return DeleteFileW( source );
- if (flag & MOVEFILE_WRITE_THROUGH) - FIXME("MOVEFILE_WRITE_THROUGH unimplemented\n"); - /* check if we are allowed to rename the source */
if (!RtlDosPathNameToNtPathName_U( source, &nt_name, NULL, NULL )) @@ -1336,8 +1334,11 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest, SetLastError( ERROR_PATH_NOT_FOUND ); goto error; } - status = NtOpenFile( &dest_handle, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, &attr, &io, 0, - FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT ); + + options = FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT; + if (flag & MOVEFILE_WRITE_THROUGH) + options |= FILE_WRITE_THROUGH; + status = NtOpenFile( &dest_handle, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, &attr, &io, 0, options ); if (status == STATUS_SUCCESS) /* destination exists */ { NtClose( dest_handle );