]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei: refresh watches before MUA spawn for Maildir
authorEric Wong <e@80x24.org>
Tue, 31 Aug 2021 11:21:23 +0000 (11:21 +0000)
committerEric Wong <e@80x24.org>
Tue, 31 Aug 2021 11:29:12 +0000 (11:29 +0000)
If we possibly just wrote or created a Maildir, ensure it's
monitored by the lei watch mechanism.

lib/PublicInbox/LEI.pm

index 520fb51940f14b29913885ad11d9df69d96c0241..41e811cac7cc3e3eec259f2c8312daf79b4f2fe0 100644 (file)
@@ -951,6 +951,9 @@ sub exec_buf ($$) {
 
 sub start_mua {
        my ($self) = @_;
+       if ($self->{ovv}->{fmt} =~ /\A(?:maildir)\z/) { # TODO: IMAP
+               refresh_watches($self);
+       }
        my $mua = $self->{opt}->{mua} // return;
        my $mfolder = $self->{ovv}->{dst};
        my (@cmd, $replaced);