]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei/store: quiet down link(2) warnings
authorEric Wong <e@80x24.org>
Fri, 3 Sep 2021 08:54:21 +0000 (08:54 +0000)
committerEric Wong <e@80x24.org>
Fri, 3 Sep 2021 08:55:04 +0000 (08:55 +0000)
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

index a91b30f749520b9ad2eab309d00e168d79fba863..f81a8dae204c04b538533a7c61e306d182c0e7f0 100644 (file)
@@ -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);
 }