From: Eric Wong Date: Sat, 14 Sep 2019 09:21:05 +0000 (+0000) Subject: admin: warn and ignore inaccessible inboxes X-Git-Tag: v1.2.0~103 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=44165c19397c576eb0147930c707867e729925e6 admin: warn and ignore inaccessible inboxes For whatever reason, inbox directories can go missing temporarily or permanently. Tell the admin about them and continue on our way. --- 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}) {