} elsif (-f $path) {
my $basename = basename $path;
push @it, $path
if ( not @$filenames or ( grep { $basename =~ /$_/ } @$filenames ) )
if ( not @$filenames or ( grep { $path =~ /$_/ } @$filenames ) )
and (!defined $type || $dirent =~ /\.(?:$type)$/) || $action eq 'install';
} elsif (-d $path && $recursive_p) {
push @it, listfiles($path, $type, $action, $filenames);
-