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: Jon Doron <arilou@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
69d3c7a00f
commit
aa5107b165
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue