Browse Source

pas2js: fixed globbing * ignoring . and ..

git-svn-id: trunk@37765 -
Mattias Gaertner 7 years ago
parent
commit
effbafabd2
1 changed files with 1 additions and 0 deletions
  1. 1 0
      utils/pas2js/pas2jsfileutils.pp

+ 1 - 0
utils/pas2js/pas2jsfileutils.pp

@@ -494,6 +494,7 @@ begin
       Path:=LeftStr(Mask,p-1);
       if FindFirst(Path,faAnyFile,Info)=0 then begin
         repeat
+          if (Info.Name='') or (Info.Name='.') or (Info.Name='..') then continue;
           Filename:=ExtractFilePath(Path)+Info.Name;
           if p>length(Mask) then begin
             // e.g. /path/unit*.pas