Delete existing files before overwriting them for Darwin OS to avoid codesign issues

git-svn-id: trunk@49131 -
This commit is contained in:
pierre 2021-04-06 22:43:21 +00:00
parent 432cd5bdd3
commit 103599ede0

View File

@ -6196,6 +6196,9 @@ Var
FileStat: stat;
{$endif UNIX}
begin
{ First delete file on Darwin OS to avoid codesign issues }
if (Defaults.SourceOS=Darwin) and FileExists(Dest) then
SysDeleteFile(Dest);
Log(vlInfo,SInfoCopyingFile,[Src,Dest]);
FIn:=TFileStream.Create(Src,fmopenRead or fmShareDenyNone);
Try