about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-09-03 08:54:21 +0000
committerEric Wong <e@80x24.org>2021-09-03 08:55:04 +0000
commit0ea8c77b4339398131889afd2405b5e10abd8f57 (patch)
tree973020646734403063200125e44015796024564c
parent73740c9e97efdd98e87a1d52fc064bffe449be83 (diff)
downloadpublic-inbox-0ea8c77b4339398131889afd2405b5e10abd8f57.tar.gz
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).
-rw-r--r--lib/PublicInbox/LeiStore.pm10
1 files 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);
 }