mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-24 10:41:33 +02:00
TFileSearcher: supply fully qualified filename for OnQueryFileFound and OnQueryDirectoryFound events.
This commit is contained in:
parent
0fd4564df7
commit
6e1eac9018
@ -832,7 +832,7 @@ var
|
|||||||
// Deal with both files and directories
|
// Deal with both files and directories
|
||||||
if (PathInfo.Attr and faDirectory) = 0 then
|
if (PathInfo.Attr and faDirectory) = 0 then
|
||||||
begin // File
|
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
|
begin
|
||||||
FPath := APath;
|
FPath := APath;
|
||||||
FLevel := ALevel;
|
FLevel := ALevel;
|
||||||
@ -841,7 +841,7 @@ var
|
|||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else begin // Directory
|
else begin // Directory
|
||||||
if AcceptDir(PathInfo.Name) then
|
if AcceptDir(AppendPathDelim(ExpandFilenameUtf8(APath + PathInfo.Name))) then
|
||||||
begin
|
begin
|
||||||
FPath := APath;
|
FPath := APath;
|
||||||
FLevel := ALevel;
|
FLevel := ALevel;
|
||||||
@ -869,7 +869,7 @@ var
|
|||||||
FileIsInPath(ExpandFilenameUTF8(ReadAllLinks(APath+PathInfo.Name,False)),ExpandFilenameUTF8(APath)) or
|
FileIsInPath(ExpandFilenameUTF8(ReadAllLinks(APath+PathInfo.Name,False)),ExpandFilenameUTF8(APath)) or
|
||||||
FileIsInPath(ExpandFilenameUTF8(APath),ExpandFilenameUTF8(ReadAllLinks(APath+PathInfo.Name,False))))
|
FileIsInPath(ExpandFilenameUTF8(APath),ExpandFilenameUTF8(ReadAllLinks(APath+PathInfo.Name,False))))
|
||||||
) or
|
) or
|
||||||
(not AcceptDir(PathInfo.Name))
|
(not AcceptDir(AppendPathDelim(ExpandFilenameUtf8(APath + PathInfo.Name))))
|
||||||
then Continue;
|
then Continue;
|
||||||
|
|
||||||
FPath := APath;
|
FPath := APath;
|
||||||
|
Loading…
Reference in New Issue
Block a user