X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Ffiles.pl;h=c57accc14806d44dc0c681f46e8baf1a23f60842;hb=35432a9f25350b9a5db513efbe248b61176b0684;hp=68526a49c029648050fac32c78f17ccb28ab8c2a;hpb=bad1ddf774c205e1cf0e012860d06481abbbb400;p=spider.git diff --git a/cmd/show/files.pl b/cmd/show/files.pl index 68526a49..c57accc1 100644 --- a/cmd/show/files.pl +++ b/cmd/show/files.pl @@ -15,6 +15,7 @@ my @out; my @file; my @d; my @slot; +my $patt = '^.*$'; if (@f) { my $fn = lc $f[0]; @@ -22,6 +23,8 @@ if (@f) { $fn =~ s/\.//og; $fn =~ s/^\///og; $root = "$root/$fn"; + + $patt = shellregex(lc $f[1]) if defined $f[1]; } opendir(DIR, $root) or return (1, $self->msg('e3', 'show/files', $f[0])); @@ -31,6 +34,7 @@ closedir(DIR); my $flag = 0; for (@file) { next if /^\./; + next unless m{$patt}; my $fn = "$root/$_"; my $size;