mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 21:41:35 +02:00
LazUtils: Change CopyFile's behavior to match the earlier version. Issue #22259, patch from Mario Bonati
git-svn-id: trunk@37641 -
This commit is contained in:
parent
d91e9ccb16
commit
68d9311e48
@ -969,14 +969,14 @@ begin
|
||||
end;
|
||||
|
||||
function CopyFile(const SrcFilename, DestFilename: string; PreserveTime: Boolean): boolean;
|
||||
// Deparecated because Flags parameter can used for the same thing.
|
||||
// Flags parameter can be used for the same thing.
|
||||
var
|
||||
Flags: TCopyFileFlags;
|
||||
begin
|
||||
if PreserveTime then
|
||||
Flags:=[cffPreserveTime]
|
||||
Flags:=[cffPreserveTime, cffOverwriteFile]
|
||||
else
|
||||
Flags:=[];
|
||||
Flags:=[cffOverwriteFile];
|
||||
Result := CopyFile(SrcFilename, DestFilename, Flags);
|
||||
end;
|
||||
|
||||
|
@ -184,7 +184,6 @@ type
|
||||
function CopyFile(const SrcFilename, DestFilename: string;
|
||||
Flags: TCopyFileFlags=[cffOverwriteFile]): boolean;
|
||||
function CopyFile(const SrcFilename, DestFilename: string; PreserveTime: boolean): boolean;
|
||||
deprecated 'use cffPreserveTime in Flags parameter instead';
|
||||
function CopyDirTree(const SourceDir, TargetDir: string; Flags: TCopyFileFlags=[]): Boolean;
|
||||
|
||||
// file actions
|
||||
|
Loading…
Reference in New Issue
Block a user