lib/PublicInbox/LeiImport.pm | 8 ++++---- lib/PublicInbox/LeiStore.pm | 6 ------ diff --git a/lib/PublicInbox/LeiImport.pm b/lib/PublicInbox/LeiImport.pm index 23cecd53cec816710b8771ae378d3210778926db..815788b38149c5f8f84d298f88fb3b1b65505659 100644 --- a/lib/PublicInbox/LeiImport.pm +++ b/lib/PublicInbox/LeiImport.pm @@ -147,9 +147,9 @@ }; $lei->child_error(1 << 8, "$input: $@") if $@; } -sub _import_maildir { # maildir_each_file cb - my ($f, $sto, $set_kw) = @_; - $sto->ipc_do('set_eml_from_maildir', $f, $set_kw); +sub _import_maildir { # maildir_each_eml cb + my ($f, $kw, $eml, $sto, $set_kw) = @_; + $sto->ipc_do('set_eml', $eml, $set_kw ? @$kw : ()); } sub _import_net { # imap_each, nntp_each cb @@ -181,7 +181,7 @@ } elsif (-d _ && (-d "$input/cur" || -d "$input/new")) { return $lei->fail(<{sto}, $lei->{opt}->{kw}); } else { diff --git a/lib/PublicInbox/LeiStore.pm b/lib/PublicInbox/LeiStore.pm index 92c29100a3ee7372b1cde27bab0013f4736d2c11..6ace2ad1d5c8e46cd4301d2a0c5ef75494fb7920 100644 --- a/lib/PublicInbox/LeiStore.pm +++ b/lib/PublicInbox/LeiStore.pm @@ -213,12 +213,6 @@ my ($self, $eml, @kw) = @_; add_eml($self, $eml, @kw) // set_eml_keywords($self, $eml, @kw); } -sub set_eml_from_maildir { - my ($self, $f, $set_kw) = @_; - my $eml = eml_from_path($f) or return; - set_eml($self, $eml, $set_kw ? maildir_keywords($f) : ()); -} - sub checkpoint { my ($self, $wait) = @_; if (my $im = $self->{im}) {