mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-05 18:48:29 +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;
|
FPath := APath;
|
||||||
FLevel := ALevel;
|
FLevel := ALevel;
|
||||||
FFileInfo := PathInfo;
|
FFileInfo := PathInfo;
|
||||||
DoDirectoryEnter;
|
|
||||||
if not FSearching then Break;
|
if not FSearching then Break;
|
||||||
|
DoDirectoryEnter;
|
||||||
if Assigned(VisitedDirs) then
|
if Assigned(VisitedDirs) then
|
||||||
VisitedDirs.Add(FQDir,'');
|
VisitedDirs.Add(FQDir,'');
|
||||||
DoSearch(AppendPathDelim(APath + PathInfo.Name), Succ(ALevel));
|
DoSearch(AppendPathDelim(APath + PathInfo.Name), Succ(ALevel));
|
||||||
|
|
||||||
until (FindNextUTF8(PathInfo) <> 0);
|
until (FindNextUTF8(PathInfo) <> 0) or (not FSearching);
|
||||||
finally
|
finally
|
||||||
FindCloseUTF8(PathInfo);
|
FindCloseUTF8(PathInfo);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user