mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 16:38:02 +02:00
TFileSearcher: don't enter subfolder and don't call OnDirectoryEnter when FSearching = False
This commit is contained in:
parent
c95ec9df9f
commit
180dcc8888
@ -899,13 +899,13 @@ var
|
||||
FPath := APath;
|
||||
FLevel := ALevel;
|
||||
FFileInfo := PathInfo;
|
||||
DoDirectoryEnter;
|
||||
if not FSearching then Break;
|
||||
DoDirectoryEnter;
|
||||
if Assigned(VisitedDirs) then
|
||||
VisitedDirs.Add(FQDir,'');
|
||||
DoSearch(AppendPathDelim(APath + PathInfo.Name), Succ(ALevel));
|
||||
|
||||
until (FindNextUTF8(PathInfo) <> 0);
|
||||
until (FindNextUTF8(PathInfo) <> 0) or (not FSearching);
|
||||
finally
|
||||
FindCloseUTF8(PathInfo);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user