mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-04 12:00:18 +02:00
* Corrected recursive behaviour, used allfilesmask
git-svn-id: trunk@16125 -
This commit is contained in:
parent
da8fbdb76e
commit
8fc60d8e8c
@ -204,7 +204,7 @@ begin
|
|||||||
FTemplateDir:=IncludeTrailingPathDelimiter(ATemplateDir);
|
FTemplateDir:=IncludeTrailingPathDelimiter(ATemplateDir);
|
||||||
D:=FTemplateDir;
|
D:=FTemplateDir;
|
||||||
try
|
try
|
||||||
If FindFirst(D+'*',faDirectory,Info)=0 then
|
If FindFirst(D+AllFilesMask,faDirectory,Info)=0 then
|
||||||
Repeat
|
Repeat
|
||||||
If ((Info.Attr and faDirectory)<>0)
|
If ((Info.Attr and faDirectory)<>0)
|
||||||
and not ((Info.Name='.') or (Info.Name='..') or (Info.Name='')) then
|
and not ((Info.Name='.') or (Info.Name='..') or (Info.Name='')) then
|
||||||
@ -391,7 +391,7 @@ Var
|
|||||||
Info : TSearchRec;
|
Info : TSearchRec;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
If FindFirst(Dir+'*',0,Info)=0 then
|
If FindFirst(Dir+AllFilesMask,0,Info)=0 then
|
||||||
try
|
try
|
||||||
repeat
|
repeat
|
||||||
if (info.name<>'description.txt') and (info.name<>'project.ini') then
|
if (info.name<>'description.txt') and (info.name<>'project.ini') then
|
||||||
@ -401,8 +401,8 @@ begin
|
|||||||
FindClose(Info);
|
FindClose(Info);
|
||||||
end;
|
end;
|
||||||
if Recurse then
|
if Recurse then
|
||||||
If (FindFirst(Dir+'*',0,Info)<>0) then
|
If (FindFirst(Dir+AllFilesMask,0,Info)=0) then
|
||||||
try
|
try[A
|
||||||
repeat
|
repeat
|
||||||
if ((Info.attr and faDirectory)<>0) and
|
if ((Info.attr and faDirectory)<>0) and
|
||||||
(Info.Name<>'.') and (info.Name<>'..') and (Info.Name<>'') then
|
(Info.Name<>'.') and (info.Name<>'..') and (Info.Name<>'') then
|
||||||
@ -425,7 +425,7 @@ begin
|
|||||||
D2:=IncludeTrailingPathDelimiter(DestDir);
|
D2:=IncludeTrailingPathDelimiter(DestDir);
|
||||||
If not ForceDirectories(D2) then
|
If not ForceDirectories(D2) then
|
||||||
Raise ETemplateError.CreateFmt(SErrCouldNotCreateDir,[D2]);
|
Raise ETemplateError.CreateFmt(SErrCouldNotCreateDir,[D2]);
|
||||||
If FindFirst(D1+'*',0,Info)=0 then
|
If FindFirst(D1+AllFilesMask,0,Info)=0 then
|
||||||
try
|
try
|
||||||
repeat
|
repeat
|
||||||
if (info.name<>'description.txt')
|
if (info.name<>'description.txt')
|
||||||
@ -436,7 +436,7 @@ begin
|
|||||||
FindClose(Info);
|
FindClose(Info);
|
||||||
end;
|
end;
|
||||||
if Recurse then
|
if Recurse then
|
||||||
If (FindFirst(D1+'*',0,Info)<>0) then
|
If (FindFirst(D1+AllFilesmask,0,Info)<>0) then
|
||||||
try
|
try
|
||||||
repeat
|
repeat
|
||||||
if ((Info.attr and faDirectory)<>0) and
|
if ((Info.attr and faDirectory)<>0) and
|
||||||
|
Loading…
Reference in New Issue
Block a user