mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 11:59:45 +02:00
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:
parent
5f19d0caf8
commit
bb021c62c4
@ -823,7 +823,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(PathInfo.Name) then
|
if ((MaskList = nil) or MaskList.Matches(PathInfo.Name)) and AcceptFile(APath+PathInfo.Name) then
|
||||||
begin
|
begin
|
||||||
FPath := APath;
|
FPath := APath;
|
||||||
FLevel := ALevel;
|
FLevel := ALevel;
|
||||||
@ -854,7 +854,7 @@ var
|
|||||||
if (PathInfo.Name = '.') or (PathInfo.Name = '..') or
|
if (PathInfo.Name = '.') or (PathInfo.Name = '..') or
|
||||||
(PathInfo.Name = '') or ((PathInfo.Attr and faDirectory) = 0) or
|
(PathInfo.Name = '') or ((PathInfo.Attr and faDirectory) = 0) or
|
||||||
(not FFollowSymLink and FileIsSymlink(APath + PathInfo.Name)) or
|
(not FFollowSymLink and FileIsSymlink(APath + PathInfo.Name)) or
|
||||||
(not AcceptDir(PathInfo.Name))
|
(not AcceptDir(APath+PathInfo.Name))
|
||||||
then Continue;
|
then Continue;
|
||||||
|
|
||||||
FPath := APath;
|
FPath := APath;
|
||||||
|
Loading…
Reference in New Issue
Block a user