forked from Mirrors/wine-wine
kernel32: Don't fail ReplaceFile() if unable to delete a generated backup.
Windows will just leave the file if unable to delete it. Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>feature/deterministic
parent
faebd0ce14
commit
bae4776c57
|
@ -507,11 +507,7 @@ BOOL WINAPI ReplaceFileW(LPCWSTR lpReplacedFileName, LPCWSTR lpReplacementFileNa
|
|||
|| !MoveFileExW( lpReplacedFileName, temp_file, MOVEFILE_REPLACE_EXISTING ))
|
||||
return FALSE;
|
||||
|
||||
if (!DeleteFileW( temp_file ))
|
||||
{
|
||||
SetLastError( ERROR_UNABLE_TO_REMOVE_REPLACED );
|
||||
return FALSE;
|
||||
}
|
||||
DeleteFileW( temp_file );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -3841,12 +3841,12 @@ static void test_ReplaceFileA(void)
|
|||
ok(ret, "got error %u\n", GetLastError());
|
||||
|
||||
ret = ReplaceFileA(replaced, replacement, NULL, 0, 0, 0);
|
||||
todo_wine ok(ret, "got error %u\n", GetLastError());
|
||||
ok(ret, "got error %u\n", GetLastError());
|
||||
|
||||
CloseHandle(mapping);
|
||||
CloseHandle(hReplacedFile);
|
||||
ret = DeleteFileA(replaced);
|
||||
todo_wine ok(ret, "got error %u\n", GetLastError());
|
||||
ok(ret, "got error %u\n", GetLastError());
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue