TFileSearcher: add path to filename for OnQueryFileFound and OnQueryDirectoryFound.

Reason: Self.Path is not up to date unless directory will be entered, which is only done after the call.
This commit is contained in:
Bart 2024-01-13 23:15:24 +01:00
parent 5f19d0caf8
commit bb021c62c4

View File

@ -823,7 +823,7 @@ var
// Deal with both files and directories
if (PathInfo.Attr and faDirectory) = 0 then
begin // File
if ((MaskList = nil) or MaskList.Matches(PathInfo.Name)) and AcceptFile(PathInfo.Name) then
if ((MaskList = nil) or MaskList.Matches(PathInfo.Name)) and AcceptFile(APath+PathInfo.Name) then
begin
FPath := APath;
FLevel := ALevel;
@ -854,7 +854,7 @@ var
if (PathInfo.Name = '.') or (PathInfo.Name = '..') or
(PathInfo.Name = '') or ((PathInfo.Attr and faDirectory) = 0) or
(not FFollowSymLink and FileIsSymlink(APath + PathInfo.Name)) or
(not AcceptDir(PathInfo.Name))
(not AcceptDir(APath+PathInfo.Name))
then Continue;
FPath := APath;