mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 14:59:15 +02:00
codetools: skip fpc src directoy packages/amunits
git-svn-id: trunk@22468 -
This commit is contained in:
parent
e19baa54d3
commit
9595f3e726
@ -3361,6 +3361,23 @@ var
|
|||||||
Result:=Dir+Result;
|
Result:=Dir+Result;
|
||||||
end;
|
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;
|
function BrowseDirectory(ADirPath: string; Priority: integer): boolean;
|
||||||
const
|
const
|
||||||
IgnoreDirs: array[1..16] of shortstring =(
|
IgnoreDirs: array[1..16] of shortstring =(
|
||||||
@ -3385,6 +3402,13 @@ var
|
|||||||
if ADirPath='' then exit;
|
if ADirPath='' then exit;
|
||||||
ADirPath:=AppendPathDelim(ADirPath);
|
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);
|
inc(ProgressID);
|
||||||
if CheckAbort(ProgressID,-1) then exit(false);
|
if CheckAbort(ProgressID,-1) then exit(false);
|
||||||
// read Makefile.fpc to get some hints
|
// read Makefile.fpc to get some hints
|
||||||
|
Loading…
Reference in New Issue
Block a user