mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 07:16:16 +02:00
codetools: skip fpc src directoy packages/amunits
git-svn-id: trunk@22468 -
This commit is contained in:
parent
e19baa54d3
commit
9595f3e726
@ -3360,6 +3360,23 @@ var
|
||||
end;
|
||||
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
|
||||
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user