X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Ffiles.pl;h=2463fe96b1dbbe2e66b1836c7ea3b91ae827b715;hb=f493dbf120a0a175a7788ee51c9928377b0f4c50;hp=68526a49c029648050fac32c78f17ccb28ab8c2a;hpb=bad1ddf774c205e1cf0e012860d06481abbbb400;p=spider.git diff --git a/cmd/show/files.pl b/cmd/show/files.pl index 68526a49..2463fe96 100644 --- a/cmd/show/files.pl +++ b/cmd/show/files.pl @@ -5,7 +5,7 @@ # # Copyright (c) 1999 Dirk Koopman G1TLH # -# $Id$ +# # my ($self, $line) = @_; @@ -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;