mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 23:39:24 +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;
|
||||
// Deal with both files and directories
|
||||
if (PathInfo.Attr and faDirectory) = 0 then
|
||||
begin
|
||||
if (MaskList = nil) or MaskList.Matches(PathInfo.Name) then
|
||||
begin
|
||||
begin // File
|
||||
if (MaskList = nil) or MaskList.Matches(PathInfo.Name)
|
||||
{$IFDEF Windows}
|
||||
// On Windows files without extension must be included for *.*
|
||||
or ((ASearchMask = AllFilesMask) and (ExtractFileExt(PathInfo.Name) = ''))
|
||||
{$ENDIF}
|
||||
then begin
|
||||
FPath := APath;
|
||||
FLevel := ALevel;
|
||||
FFileInfo := PathInfo;
|
||||
DoFileFound;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
else begin // Directory
|
||||
FPath := APath;
|
||||
FLevel := ALevel;
|
||||
FFileInfo := PathInfo;
|
||||
|
Loading…
Reference in New Issue
Block a user