]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LeiInput.pm
No ext_urls
[public-inbox.git] / lib / PublicInbox / LeiInput.pm
index 540681e3ff6bbef3c0c24417c3a8063305bfb14c..b6c2b6bbe8b77b30af2e273be04a548049a15937 100644 (file)
@@ -30,7 +30,9 @@ my %ERR = (
                my ($label) = @_;
                length($label) >= $L_MAX and
                        return "`$label' too long (must be <= $L_MAX)";
-               $label =~ m{\A[a-z0-9_](?:[a-z0-9_\-\./\@,]*[a-z0-9])?\z}i ?
+               $label =~ /[A-Z]/ and
+                       return "`$label' must be lowercase";
+               $label =~ m{\A[a-z0-9_](?:[a-z0-9_\-\./\@,]*[a-z0-9])?\z} ?
                        undef : "`$label' is invalid";
        },
        kw => sub {
@@ -64,6 +66,11 @@ sub input_mbox_cb { # base MboxReader callback
        $self->input_eml_cb($eml);
 }
 
+sub input_maildir_cb {
+       my ($fn, $kw, $eml, $self) = @_;
+       $self->input_eml_cb($eml);
+}
+
 sub input_net_cb { # imap_each, nntp_each cb
        my ($url, $uid, $kw, $eml, $self) = @_;
        $self->input_eml_cb($eml);
@@ -172,7 +179,7 @@ sub input_path_url {
                        $mbl->{fh} =
                             PublicInbox::MboxReader::zsfxcat($in, $zsfx, $lei);
                }
-               local $PublicInbox::DS::in_loop = 0 if $zsfx; # dwaitpid
+               local $PublicInbox::DS::in_loop = 0 if $zsfx; # awaitpid
                $self->input_fh($ifmt, $mbl->{fh}, $input, @args);
        } elsif (-d _ && (-d "$input/cur" || -d "$input/new")) {
                return $lei->fail(<<EOM) if $ifmt && $ifmt ne 'maildir';