mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-30 17:40:28 +02:00
Merge trunk commits 49131 and 49202
------------------------------------------------------------------------ r49131 | pierre | 2021-04-06 16:43:21 -0600 (Tue, 06 Apr 2021) | 1 line Changed paths: M /trunk/packages/fpmkunit/src/fpmkunit.pp Delete existing files before overwriting them for Darwin OS to avoid codesign issues ------------------------------------------------------------------------ ------------------------------------------------------------------------ r49202 | pierre | 2021-04-14 02:06:54 -0600 (Wed, 14 Apr 2021) | 1 line Also delete file before copying if destination is a directory on Darwin OS ------------------------------------------------------------------------ git-svn-id: branches/fixes_3_2@49204 -
This commit is contained in:
parent
946d9ec715
commit
0b5797e566
@ -5831,6 +5831,18 @@ Var
|
|||||||
FileStat: stat;
|
FileStat: stat;
|
||||||
{$endif UNIX}
|
{$endif UNIX}
|
||||||
begin
|
begin
|
||||||
|
{$ifdef DARWIN}
|
||||||
|
{ First delete file on Darwin OS to avoid codesign issues }
|
||||||
|
D:=IncludeTrailingPathDelimiter(Dest);
|
||||||
|
If DirectoryExists(D) then
|
||||||
|
begin
|
||||||
|
D:=D+ExtractFileName(Src);
|
||||||
|
if FileExists(D) then
|
||||||
|
SysDeleteFile(D);
|
||||||
|
end
|
||||||
|
else if FileExists(Dest) then
|
||||||
|
SysDeleteFile(Dest);
|
||||||
|
{$endif DARWIN}
|
||||||
Log(vlInfo,SInfoCopyingFile,[Src,Dest]);
|
Log(vlInfo,SInfoCopyingFile,[Src,Dest]);
|
||||||
FIn:=TFileStream.Create(Src,fmopenRead or fmShareDenyNone);
|
FIn:=TFileStream.Create(Src,fmopenRead or fmShareDenyNone);
|
||||||
Try
|
Try
|
||||||
|
Loading…
Reference in New Issue
Block a user