--- /usr/lib64/perl5/vendor_perl/5.8.8/PortageXS/Core.pm 2009-04-01 18:12:02.000000000 +0200 +++ PortageXS/Core.pm 2009-04-02 20:29:43.000000000 +0200 @@ -306,13 +306,15 @@ # - not excluded and $_ is a dir? if (! $self->{'EXCLUDE_DIRS'}{$tc} && -d $repo.'/'.$tc) { $dhp = new DirHandle($repo.'/'.$tc); - while (defined($tp = $dhp->read)) { - # - look up if entry matches the search - # (much faster if we already check now) > - if ($tp =~m/$searchString/i) { - # - not excluded and $_ is a dir? - if (! $self->{'EXCLUDE_DIRS'}{$tp} && -d $repo.'/'.$tc.'/'.$tp) { - push(@matches,$tc.'/'.$tp); + if (defined $dhp) { + while (defined($tp = $dhp->read)) { + # - look up if entry matches the search + # (much faster if we already check now) > + if ($tp =~m/$searchString/i) { + # - not excluded and $_ is a dir? + if (! $self->{'EXCLUDE_DIRS'}{$tp} && -d $repo.'/'.$tc.'/'.$tp) { + push(@matches,$tc.'/'.$tp); + } } } } @@ -330,13 +332,15 @@ # - not excluded and $_ is a dir? if (! $self->{'EXCLUDE_DIRS'}{$tc} && -d $repo.'/'.$tc) { $dhp = new DirHandle($repo.'/'.$tc); - while (defined($tp = $dhp->read)) { - # - look up if entry matches the search - # (much faster if we already check now) > - if ($tp eq $searchString) { - # - not excluded and $_ is a dir? - if (! $self->{'EXCLUDE_DIRS'}{$tp} && -d $repo.'/'.$tc.'/'.$tp) { - push(@matches,$tc.'/'.$tp); + if (defined $dhp) { + while (defined($tp = $dhp->read)) { + # - look up if entry matches the search + # (much faster if we already check now) > + if ($tp eq $searchString) { + # - not excluded and $_ is a dir? + if (! $self->{'EXCLUDE_DIRS'}{$tp} && -d $repo.'/'.$tc.'/'.$tp) { + push(@matches,$tc.'/'.$tp); + } } } }