mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-29 06:35:55 +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);
|
FileList.Add(TempDir + FileInfo.Name);
|
||||||
end;//if
|
end;//if
|
||||||
until SysUtils.FindNext(FileInfo)<>0;
|
until SysUtils.FindNext(FileInfo)<>0;
|
||||||
SysUtils.FindClose(FileInfo);
|
|
||||||
end;//if
|
end;//if
|
||||||
|
SysUtils.FindClose(FileInfo);
|
||||||
end;//for
|
end;//for
|
||||||
finally
|
finally
|
||||||
MaskList.Free;
|
MaskList.Free;
|
||||||
end;//try-finally
|
end;//try-finally
|
||||||
//If selected then Look for and search subdirectories
|
//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
|
+FindMask,faAnyFile,FileInfo)=0) then
|
||||||
begin
|
|
||||||
if ((faDirectory and FileInfo.Attr)>0) then
|
|
||||||
begin
|
begin
|
||||||
repeat
|
if ((faDirectory and FileInfo.Attr)>0) then
|
||||||
// check if special file
|
begin
|
||||||
if (FileInfo.Name='.') or (FileInfo.Name='..') then continue;
|
repeat
|
||||||
FindMatchingTextFiles
|
// check if special file
|
||||||
(FileList,TempDir + FileInfo.Name,mask,recursive);
|
if (FileInfo.Name='.') or (FileInfo.Name='..') then continue;
|
||||||
until SysUtils.FindNext(FileInfo)<>0;
|
FindMatchingTextFiles
|
||||||
end;//if
|
(FileList,TempDir + FileInfo.Name,mask,recursive);
|
||||||
SysUtils.FindClose(FileInfo);
|
until SysUtils.FindNext(FileInfo)<>0;
|
||||||
|
end;//if
|
||||||
|
SysUtils.FindClose(FileInfo);
|
||||||
|
end;
|
||||||
end;//if
|
end;//if
|
||||||
end;//if
|
end;//if
|
||||||
end;//FindMatchingFiles
|
end;//FindMatchingFiles
|
||||||
|
Loading…
Reference in New Issue
Block a user