Browse Source

* Use defines from the system unit to improve cross-platform behavior

git-svn-id: trunk@20165 -
joost 13 years ago
parent
commit
293f815e8a
1 changed files with 2 additions and 4 deletions
  1. 2 4
      packages/fpmkunit/src/fpmkunit.pp

+ 2 - 4
packages/fpmkunit/src/fpmkunit.pp

@@ -1869,17 +1869,15 @@ end;
 procedure SearchFiles(const AFileName: string; Recursive: boolean; var List: TStrings);
 procedure SearchFiles(const AFileName: string; Recursive: boolean; var List: TStrings);
 
 
   procedure AddRecursiveFiles(const SearchDir, FileMask: string; Recursive: boolean);
   procedure AddRecursiveFiles(const SearchDir, FileMask: string; Recursive: boolean);
-  const
-    IgnoreCase = {$ifdef UNIX}False{$else}True{$endif};
   var
   var
     Info : TSearchRec;
     Info : TSearchRec;
   begin
   begin
-    if FindFirst(SearchDir+'*',faAnyFile and faDirectory,Info)=0 then
+    if FindFirst(SearchDir+AllFilesMask,faAnyFile and faDirectory,Info)=0 then
     begin
     begin
       repeat
       repeat
           if ((Info.Attr and faDirectory) = faDirectory) and (Info.Name <> '.') and (Info.Name <> '..') and (Recursive) then
           if ((Info.Attr and faDirectory) = faDirectory) and (Info.Name <> '.') and (Info.Name <> '..') and (Recursive) then
             AddRecursiveFiles(SearchDir + Info.Name + PathDelim, FileMask, Recursive);
             AddRecursiveFiles(SearchDir + Info.Name + PathDelim, FileMask, Recursive);
-          if ((Info.Attr and faDirectory) <> faDirectory) and IsWild(Info.Name, FileMask, IgnoreCase) then
+          if ((Info.Attr and faDirectory) <> faDirectory) and IsWild(Info.Name, FileMask, FileNameCaseSensitive) then
             List.Add(SearchDir + Info.Name);
             List.Add(SearchDir + Info.Name);
       until FindNext(Info)<>0;
       until FindNext(Info)<>0;
     end;
     end;