From 44165c19397c576eb0147930c707867e729925e6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 14 Sep 2019 09:21:05 +0000 Subject: 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. --- lib/PublicInbox/Admin.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/PublicInbox/Admin.pm') 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}) { -- cgit v1.2.3-24-ge0c7