about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-09-14 09:21:05 +0000
committerEric Wong <e@80x24.org>2019-09-14 09:22:11 +0000
commit44165c19397c576eb0147930c707867e729925e6 (patch)
tree3f9f28962552c56fdf380678e5e04bb173bf95c0
parente14d0bb916b0a2d2e8ad482e0fe892a9a0de1871 (diff)
downloadpublic-inbox-44165c19397c576eb0147930c707867e729925e6.tar.gz
For whatever reason, inbox directories can go missing
temporarily or permanently.  Tell the admin about them
and continue on our way.
-rw-r--r--lib/PublicInbox/Admin.pm9
1 files changed, 8 insertions, 1 deletions
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 <<EOF;
+W: $ibx->{name} $ibx->{mainrepo}: $!
+EOF
+                        }
                 });
         }
         if ($opt->{all}) {