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 535ED1F463 for ; Sat, 14 Sep 2019 09:21:06 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] admin: warn and ignore inaccessible inboxes Date: Sat, 14 Sep 2019 09:21:05 +0000 Message-Id: <20190914092105.57169-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: For whatever reason, inbox directories can go missing temporarily or permanently. Tell the admin about them and continue on our way. --- lib/PublicInbox/Admin.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/Admin.pm b/lib/PublicInbox/Admin.pm index 6e710cd5..dc70d690 100644 --- a/lib/PublicInbox/Admin.pm +++ b/lib/PublicInbox/Admin.pm @@ -101,7 +101,14 @@ sub resolve_inboxes ($;$) { $cfg->each_inbox(sub { my ($ibx) = @_; $ibx->{version} ||= 1; - $dir2ibx{abs_path($ibx->{mainrepo})} = $ibx; + my $path = abs_path($ibx->{mainrepo}); + if (defined($path)) { + $dir2ibx{$path} = $ibx; + } else { + warn <{name} $ibx->{mainrepo}: $! +EOF + } }); } if ($opt->{all}) { -- EW