From 5fcdbd6c7dc4621aef817ee8aec58a8c3e3654b4 Mon Sep 17 00:00:00 2001 From: bart <9132501-flyingsheep@users.noreply.gitlab.com> Date: Wed, 1 May 2013 11:03:12 +0000 Subject: [PATCH] TFileSearcher.Search: use Windows specific file pattern matching on Windows. Fixes issue #0024306 git-svn-id: trunk@40973 - --- components/lazutils/fileutil.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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;