Function "CopyDirTree" is not working anymore in 1.6
Original Reporter info from Mantis: delphifreak
-
Reporter name: samuel herzog
Original Reporter info from Mantis: delphifreak
- Reporter name: samuel herzog
Description:
The function "CopyDirTree" works fine in Lazarus 1.4.4 fpc 2.6.4
but does not work anymore in Lazarus 1.6 fpc 3.0.0
Steps to reproduce:
- unzip the attached example project.
- run project and press button.
- the content of folder "source" should be copied to folder "target".
Additional information:
procedure TForm1.Button1Click(Sender: TObject);
var
_sourcepath:string;
_targetpath:string;
begin
_sourcepath:=ExtractFilePath(application.exename)+'source\';
_targetpath:=ExtractFilePath(application.exename)+'target\';
if not CopyDirTree(_sourcepath,_targetpath,[cffOverwriteFile,cffCreateDestDirectory,cffPreserveTime]) then begin
ShowMessagefmt('Could not copy the folder <%s> to <%s>.',[_sourcepath,_targetpath]);
exit;
end;
end;
Mantis conversion info:
- Mantis ID: 29695
- OS: windows 7
- Platform: windows
- Version: 1.6
- Fixed in version: 1.7 (SVN)
- Fixed in revision: r51675 (#f7005c66)
- Target version: 1.7 (SVN)
- LazTarget: 1.6