mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-19 17:22:43 +02:00
fixed findclose
git-svn-id: trunk@3439 -
This commit is contained in:
parent
b73b5353d5
commit
b49c62e4b0
@ -2090,26 +2090,28 @@ begin
|
||||
FileList.Add(TempDir + FileInfo.Name);
|
||||
end;//if
|
||||
until SysUtils.FindNext(FileInfo)<>0;
|
||||
SysUtils.FindClose(FileInfo);
|
||||
end;//if
|
||||
SysUtils.FindClose(FileInfo);
|
||||
end;//for
|
||||
finally
|
||||
MaskList.Free;
|
||||
end;//try-finally
|
||||
//If selected then Look for and search subdirectories
|
||||
if (recursive) and (SysUtils.FindFirst(TempDir
|
||||
if (recursive) then begin
|
||||
if (SysUtils.FindFirst(TempDir
|
||||
+FindMask,faAnyFile,FileInfo)=0) then
|
||||
begin
|
||||
if ((faDirectory and FileInfo.Attr)>0) then
|
||||
begin
|
||||
repeat
|
||||
// check if special file
|
||||
if (FileInfo.Name='.') or (FileInfo.Name='..') then continue;
|
||||
FindMatchingTextFiles
|
||||
(FileList,TempDir + FileInfo.Name,mask,recursive);
|
||||
until SysUtils.FindNext(FileInfo)<>0;
|
||||
end;//if
|
||||
SysUtils.FindClose(FileInfo);
|
||||
if ((faDirectory and FileInfo.Attr)>0) then
|
||||
begin
|
||||
repeat
|
||||
// check if special file
|
||||
if (FileInfo.Name='.') or (FileInfo.Name='..') then continue;
|
||||
FindMatchingTextFiles
|
||||
(FileList,TempDir + FileInfo.Name,mask,recursive);
|
||||
until SysUtils.FindNext(FileInfo)<>0;
|
||||
end;//if
|
||||
SysUtils.FindClose(FileInfo);
|
||||
end;
|
||||
end;//if
|
||||
end;//if
|
||||
end;//FindMatchingFiles
|
||||
|
Loading…
Reference in New Issue
Block a user