diff options
author | Eric Wong <e@80x24.org> | 2021-10-26 10:47:26 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-10-26 17:44:01 +0000 |
commit | 54b0c90cff0c29040807b0073b71ad1e5467afbc (patch) | |
tree | a3b3f936119e24872cbcfefb87bb0ec15aa05695 | |
parent | 2251a10158054d89868ff73784ce7af6e28949fa (diff) | |
download | public-inbox-54b0c90cff0c29040807b0073b71ad1e5467afbc.tar.gz |
Mail synchronization in lei_to_mail only works for IMAP and Maildir; so don't waste time preparing mbox* writers for it.
-rw-r--r-- | lib/PublicInbox/LeiToMail.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/LeiToMail.pm b/lib/PublicInbox/LeiToMail.pm index e7220bf0..83f58a29 100644 --- a/lib/PublicInbox/LeiToMail.pm +++ b/lib/PublicInbox/LeiToMail.pm @@ -282,6 +282,7 @@ sub _maildir_write_cb ($$) { my $lse = $lei->{lse}; # may be undef my $lms = $self->{-lms_rw}; my $out = $lms ? 'maildir:'.$lei->abs_path($dst) : undef; + $lms->lms_write_prepare if $lms; # Favor cur/ and only write to new/ when augmenting. This # saves MUAs from having to do a mass rename when the initial @@ -312,6 +313,7 @@ sub _imap_write_cb ($$) { $uri->uidvalidity($mic->uidvalidity($folder)); my $lse = $lei->{lse}; # may be undef my $lms = $self->{-lms_rw}; + $lms->lms_write_prepare if $lms; sub { # for git_to_mail my ($bref, $smsg, $eml) = @_; $mic // return $lei->fail; # mic may be undef-ed in last run @@ -750,7 +752,6 @@ sub ipc_atfork_child { my ($self) = @_; my $lei = $self->{lei}; $lei->_lei_atfork_child; - $self->{-lms_rw}->lms_write_prepare if $self->{-lms_rw}; $lei->{auth}->do_auth_atfork($self) if $lei->{auth}; $SIG{__WARN__} = PublicInbox::Eml::warn_ignore_cb(); $self->SUPER::ipc_atfork_child; |