From bb021c62c45f101a01bc832f3b613f7315463ebd Mon Sep 17 00:00:00 2001 From: Bart <9132501-flyingsheep@users.noreply.gitlab.com> Date: Sat, 13 Jan 2024 23:15:24 +0100 Subject: [PATCH] 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. --- components/lazutils/fileutil.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/lazutils/fileutil.inc b/components/lazutils/fileutil.inc index bd4c7beb11..61434897ec 100644 --- a/components/lazutils/fileutil.inc +++ b/components/lazutils/fileutil.inc @@ -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;