ENOENT can be too common due to timing and concurrent access
from MUAs and "lei export-kw", and other mail synchronization
tools (e.g. mbsync and offlineimap).
---
 lib/PublicInbox/LeiStore.pm | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/lib/PublicInbox/LeiStore.pm b/lib/PublicInbox/LeiStore.pm
index a91b30f7..f81a8dae 100644
--- a/lib/PublicInbox/LeiStore.pm
+++ b/lib/PublicInbox/LeiStore.pm
@@ -215,14 +215,10 @@ sub export1_kw_md ($$$$$) {
                        return;
                } elsif ($! == EEXIST) { # lost race with "lei export-kw"?
                        return;
-               } elsif ($! == ENOENT) {
-                       syslog('warning', "link($src -> $dst): $!")
-               } # else loop @try
+               } elsif ($! != ENOENT) {
+                       syslog('warning', "link($src -> $dst): $!");
+               }
        }
-       my $e = $!;
-       my $src = "$mdir/{".join(',', @try)."}/$orig";
-       my $oidhex = unpack('H*', $oidbin);
-       syslog('warning', "link($src -> $dst) ($oidhex): $e");
        for (@try) { return if -e "$mdir/$_/$orig" };
        lms_clear_src($self, "maildir:$mdir", \$orig);
 }
--
unsubscribe: one-click, see List-Unsubscribe header
archive: https://public-inbox.org/meta/

Reply via email to