diff options
author | Eric Wong <e@80x24.org> | 2021-10-21 21:10:28 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-10-22 00:54:47 +0000 |
commit | 0c6132ee390667ad643f6aa6053f978f4267b2e4 (patch) | |
tree | 58f7df6a8c27449d15f1db65b356dcadc229d7da /lib/PublicInbox/LeiNoteEvent.pm | |
parent | ab02e4a584a4ed3ce457f24ccc058522344fc6cd (diff) | |
download | public-inbox-0c6132ee390667ad643f6aa6053f978f4267b2e4.tar.gz |
When a file goes away, try to make sure we don't waste time trying to access or store it.
Diffstat (limited to 'lib/PublicInbox/LeiNoteEvent.pm')
-rw-r--r-- | lib/PublicInbox/LeiNoteEvent.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/PublicInbox/LeiNoteEvent.pm b/lib/PublicInbox/LeiNoteEvent.pm index 3472e730..22d6ffac 100644 --- a/lib/PublicInbox/LeiNoteEvent.pm +++ b/lib/PublicInbox/LeiNoteEvent.pm @@ -8,6 +8,7 @@ use strict; use v5.10.1; use parent qw(PublicInbox::IPC); use PublicInbox::DS; +use Errno qw(ENOENT); our $to_flush; # { cfgpath => $lei } @@ -59,8 +60,11 @@ sub eml_event ($$$$) { sub maildir_event { # via wq_io_do my ($self, $fn, $vmd, $state) = @_; - my $eml = PublicInbox::InboxWritable::eml_from_path($fn) // return; - eml_event($self, $eml, $vmd, $state); + if (my $eml = PublicInbox::InboxWritable::eml_from_path($fn)) { + eml_event($self, $eml, $vmd, $state); + } elsif ($! == ENOENT) { + $self->{lms}->clear_src(@{$vmd->{sync_info}}); + } # else: eml_from_path already warns } sub lei_note_event { |