From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 85BD21F8C8 for ; Fri, 3 Sep 2021 08:54:27 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 2/8] lei/store: quiet down link(2) warnings Date: Fri, 3 Sep 2021 08:54:21 +0000 Message-Id: <20210903085427.5541-3-e@80x24.org> In-Reply-To: <20210903085427.5541-1-e@80x24.org> References: <20210903085427.5541-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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); }