codetools: skip fpc src directoy packages/amunits

git-svn-id: trunk@22468 -
This commit is contained in:
mattias 2009-11-07 10:56:27 +00:00
parent e19baa54d3
commit 9595f3e726

View File

@ -3361,6 +3361,23 @@ var
Result:=Dir+Result;
end;
function IsSpecialDirectory(Dir, SpecialDir: string): boolean;
var
p1: Integer;
p2: Integer;
begin
p1:=length(Dir);
p2:=length(SpecialDir);
if (p1>=1) and (Dir[p1]=PathDelim) then dec(p1);
if (p2>=1) and (SpecialDir[p2]=PathDelim) then dec(p2);
while (p1>=1) and (p2>=1)
and (UpChars[Dir[p1]]=UpChars[SpecialDir[p2]]) do begin
dec(p1);
dec(p2);
end;
Result:=(p2=0) and ((p1=0) or (Dir[p1]=PathDelim));
end;
function BrowseDirectory(ADirPath: string; Priority: integer): boolean;
const
IgnoreDirs: array[1..16] of shortstring =(
@ -3385,6 +3402,13 @@ var
if ADirPath='' then exit;
ADirPath:=AppendPathDelim(ADirPath);
// check for special directories
if IsSpecialDirectory(ADirPath,'packages'+PathDelim+'amunits') then begin
{$IFDEF VerboseFPCSrcScan}
DebugLn(['BrowseDirectory skip ',ADirPath]);
{$ENDIF}
end;
inc(ProgressID);
if CheckAbort(ProgressID,-1) then exit(false);
// read Makefile.fpc to get some hints