Remove destination file if it exists before copying.

Bug #120586 r=bryner
This commit is contained in:
seawood%netscape.com 2002-02-04 09:15:52 +00:00
parent b77fab5bcc
commit c575ed3409

View File

@ -357,6 +357,7 @@ sub do_copyfile
print " copy\t$srcpath$srcname$srcsuffix =>\n\t\t$destpath$destname$destsuffix\n";
}
}
unlink("$destpath$destname$destsuffix") if ( -e "$destpath$destname$destsuffix");
copy ("$srcpath$srcname$srcsuffix", "$destpath$destname$destsuffix") ||
die "Error: copy of file $srcpath$srcname$srcsuffix failed ($package, $component, $lineno): $!. Exiting...\n";