Commit aa5107b1 authored by Jon Doron's avatar Jon Doron Committed by Alexandre Julliard

kernel32: Fix MOVEFILE_REPLACE_EXISTING between devices.

Fix the case of rename fails because when done between 2 different devices and the MOVEFILE_REPLACE_EXISTING is set. Signed-off-by: 's avatarJon Doron <arilou@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 69d3c7a0
......@@ -1418,8 +1418,9 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
NtClose( source_handle );
RtlFreeAnsiString( &source_unix );
RtlFreeAnsiString( &dest_unix );
if (!CopyFileExW( source, dest, fnProgress,
param, NULL, COPY_FILE_FAIL_IF_EXISTS ))
if (!CopyFileExW( source, dest, fnProgress, param, NULL,
flag & MOVEFILE_REPLACE_EXISTING ?
0 : COPY_FILE_FAIL_IF_EXISTS ))
return FALSE;
return DeleteFileW( source );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment