From 6e1eac9018e121e93ae03e8b0b0c45a4dae91b1c Mon Sep 17 00:00:00 2001 From: Bart <9132501-flyingsheep@users.noreply.gitlab.com> Date: Sun, 4 Feb 2024 18:29:41 +0100 Subject: [PATCH] TFileSearcher: supply fully qualified filename for OnQueryFileFound and OnQueryDirectoryFound events. --- components/lazutils/fileutil.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/lazutils/fileutil.inc b/components/lazutils/fileutil.inc index 9fddbfb984..39ba4c65df 100644 --- a/components/lazutils/fileutil.inc +++ b/components/lazutils/fileutil.inc @@ -832,7 +832,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(APath+PathInfo.Name) then + if ((MaskList = nil) or MaskList.Matches(PathInfo.Name)) and AcceptFile(ExpandFilenameUtf8(APath+PathInfo.Name)) then begin FPath := APath; FLevel := ALevel; @@ -841,7 +841,7 @@ var end; end else begin // Directory - if AcceptDir(PathInfo.Name) then + if AcceptDir(AppendPathDelim(ExpandFilenameUtf8(APath + PathInfo.Name))) then begin FPath := APath; FLevel := ALevel; @@ -869,7 +869,7 @@ var FileIsInPath(ExpandFilenameUTF8(ReadAllLinks(APath+PathInfo.Name,False)),ExpandFilenameUTF8(APath)) or FileIsInPath(ExpandFilenameUTF8(APath),ExpandFilenameUTF8(ReadAllLinks(APath+PathInfo.Name,False)))) ) or - (not AcceptDir(PathInfo.Name)) + (not AcceptDir(AppendPathDelim(ExpandFilenameUtf8(APath + PathInfo.Name)))) then Continue; FPath := APath;