TFileSearcher.Search: use Windows specific file pattern matching on Windows.

Fixes issue #0024306

git-svn-id: trunk@40973 -
This commit is contained in:
bart 2013-05-01 11:03:12 +00:00
parent 18ac0f9649
commit 5fcdbd6c7d

View File

@ -1448,10 +1448,10 @@ var
// Deal with both files and directories
if (PathInfo.Attr and faDirectory) = 0 then
begin // File
if (MaskList = nil) or MaskList.Matches(PathInfo.Name)
{$IFDEF Windows}
// On Windows files without extension must be included for *.*
or ((ASearchMask = '*.*') and (ExtractFileExt(PathInfo.Name) = ''))
if (MaskList = nil) or MaskList.MatchesWindowsMask(PathInfo.Name)
{$ELSE}
if (MaskList = nil) or MaskList.Matches(PathInfo.Name)
{$ENDIF}
then begin
FPath := APath;