mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 02:19:32 +02:00
LazUtils: Make TFileSearcher match all files with *.* on Windows like FindFirst + FindNext do. Issue #24306
git-svn-id: trunk@40873 -
This commit is contained in:
parent
f125213df5
commit
07d79d2536
@ -1447,17 +1447,20 @@ var
|
|||||||
(PathInfo.Name = '') then Continue;
|
(PathInfo.Name = '') then Continue;
|
||||||
// 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
|
begin // File
|
||||||
if (MaskList = nil) or MaskList.Matches(PathInfo.Name) then
|
if (MaskList = nil) or MaskList.Matches(PathInfo.Name)
|
||||||
begin
|
{$IFDEF Windows}
|
||||||
|
// On Windows files without extension must be included for *.*
|
||||||
|
or ((ASearchMask = AllFilesMask) and (ExtractFileExt(PathInfo.Name) = ''))
|
||||||
|
{$ENDIF}
|
||||||
|
then begin
|
||||||
FPath := APath;
|
FPath := APath;
|
||||||
FLevel := ALevel;
|
FLevel := ALevel;
|
||||||
FFileInfo := PathInfo;
|
FFileInfo := PathInfo;
|
||||||
DoFileFound;
|
DoFileFound;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else
|
else begin // Directory
|
||||||
begin
|
|
||||||
FPath := APath;
|
FPath := APath;
|
||||||
FLevel := ALevel;
|
FLevel := ALevel;
|
||||||
FFileInfo := PathInfo;
|
FFileInfo := PathInfo;
|
||||||
|
Loading…
Reference in New Issue
Block a user