mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 14:29:36 +02:00
IDE, initial setup dlg: Use depth first strategy for searching
git-svn-id: trunk@39304 -
This commit is contained in:
parent
d38f2da57d
commit
49943df153
@ -1215,19 +1215,20 @@ end;
|
||||
procedure TSearchFpcSourceThread.DoSearch(const APath: String);
|
||||
var
|
||||
PathInfo: TSearchRec;
|
||||
FPCSrc: TSDFileInfo;
|
||||
begin
|
||||
if FindFirstUTF8(APath+AllDirectoryEntriesMask, faDirectory, PathInfo) = 0 then
|
||||
try
|
||||
repeat
|
||||
if (PathInfo.Name='') or (PathInfo.Name[1]='.') then Continue;
|
||||
if Terminated then Break;
|
||||
// fPath := APath; fFileInfo := PathInfo; Synchronize(@Debug);
|
||||
Assert(PathInfo.Name = ChompPathDelim(PathInfo.Name));
|
||||
fFoundFPCSrc:=CheckFPCSrcDir(APath+PathInfo.Name);
|
||||
if Assigned(fFoundFPCSrc) then
|
||||
Terminate // An exact match was found.
|
||||
else
|
||||
DoSearch(AppendPathDelim(APath+PathInfo.Name)); // Recursive call
|
||||
if (PathInfo.Name='') or (PathInfo.Name[1]='.') then Continue;
|
||||
//fPath := APath; fFileInfo := PathInfo; Synchronize(@Debug);
|
||||
DoSearch(AppendPathDelim(APath+PathInfo.Name)); // Recursive call
|
||||
FPCSrc:=CheckFPCSrcDir(APath+PathInfo.Name);
|
||||
if Assigned(FPCSrc) then begin
|
||||
fFoundFPCSrc:=FPCSrc; // An exact match was found.
|
||||
Terminate;
|
||||
end;
|
||||
until (FindNextUTF8(PathInfo) <> 0);
|
||||
finally
|
||||
FindCloseUTF8(PathInfo);
|
||||
|
Loading…
Reference in New Issue
Block a user