mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 20:30:01 +00:00
makedep: Handle non-overwriting rename for Windows.
This commit is contained in:
parent
7823679e20
commit
8e0b17462b
@ -960,7 +960,14 @@ static void output_dependencies(void)
|
||||
|
||||
if (tmp_name)
|
||||
{
|
||||
if (rename( tmp_name, OutputFileName ) == -1)
|
||||
int ret = rename( tmp_name, OutputFileName );
|
||||
if (ret == -1 && errno == EEXIST)
|
||||
{
|
||||
/* rename doesn't overwrite on windows */
|
||||
unlink( OutputFileName );
|
||||
ret = rename( tmp_name, OutputFileName );
|
||||
}
|
||||
if (ret == -1)
|
||||
{
|
||||
unlink( tmp_name );
|
||||
fatal_error( "failed to rename output file to '%s'\n", OutputFileName );
|
||||
|
Loading…
Reference in New Issue
Block a user