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 7F3FE1F4C6; Tue, 15 Oct 2019 20:36:34 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Cc: "Eric W. Biederman" Subject: [PATCH 5/7] config: allow "0" as a valid mainrepo path Date: Tue, 15 Oct 2019 20:36:31 +0000 Message-Id: <20191015203633.17665-6-e@80x24.org> In-Reply-To: <20191015203633.17665-1-e@80x24.org> References: <20191015203633.17665-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: It's probably wrong to use relative path names, but things are all relative these days anyways with shared and networked FSes. --- lib/PublicInbox/Config.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm index e0329ebf..509de0a0 100644 --- a/lib/PublicInbox/Config.pm +++ b/lib/PublicInbox/Config.pm @@ -93,7 +93,7 @@ sub each_inbox { # may auto-vivify if config file is non-existent: foreach my $section (@{$self->{-section_order}}) { next if $section !~ m!\Apublicinbox\.([^/]+)\z!; - $self->{"publicinbox.$1.mainrepo"} or next; + defined($self->{"publicinbox.$1.mainrepo"}) or next; my $ibx = lookup_name($self, $1) or next; $cb->($ibx); }