mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 23:00:35 +02:00
Opkman: Small bugfix(filter packages).
git-svn-id: trunk@53990 -
This commit is contained in:
parent
249ec867d3
commit
abd19309ef
@ -248,14 +248,9 @@ var
|
||||
|
||||
function IsAllowed(AName: String): Boolean;
|
||||
var
|
||||
I, P: Integer;
|
||||
I: Integer;
|
||||
begin
|
||||
Result := True;
|
||||
P := 0;
|
||||
for I := 1 to Length(AName) do
|
||||
if AName[I] = DirectorySeparator then
|
||||
P := I;
|
||||
Delete(AName, 1, P);
|
||||
for I := 0 to SLExcludedFolders.Count - 1 do
|
||||
begin
|
||||
if UpperCase(SLExcludedFolders.Strings[I]) = UpperCase(AName) then
|
||||
@ -277,7 +272,7 @@ var
|
||||
begin
|
||||
try
|
||||
repeat
|
||||
if (UpperCase(ExtractFileExt(SR.Name)) = UpperCase('.lpk')) and (IsAllowed(ExtractFileDir(Path))) then
|
||||
if (UpperCase(ExtractFileExt(SR.Name)) = UpperCase('.lpk')) then
|
||||
begin
|
||||
PackageData := TPackageData.Create;
|
||||
PackageData.FName := SR.Name;
|
||||
@ -303,7 +298,8 @@ var
|
||||
try
|
||||
repeat
|
||||
if ((SR.Attr and faDirectory) <> 0) and (SR.Name <> '.') and (SR.Name <> '..') then
|
||||
FindFiles(Path + SR.Name);
|
||||
if IsAllowed(SR.Name) then
|
||||
FindFiles(Path + SR.Name);
|
||||
until FindNext(SR) <> 0;
|
||||
finally
|
||||
FindClose(SR);
|
||||
|
Loading…
Reference in New Issue
Block a user