diff --git a/components/lazutils/fileutil.inc b/components/lazutils/fileutil.inc index 3cd34f90c8..6b96626ade 100644 --- a/components/lazutils/fileutil.inc +++ b/components/lazutils/fileutil.inc @@ -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;