Perhaps leistore.dir doesn't need to have a config file
entry if we're using the default location.
---
 lib/PublicInbox/LEI.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm
index d534f1d0..b42ba0ae 100644
--- a/lib/PublicInbox/LEI.pm
+++ b/lib/PublicInbox/LEI.pm
@@ -719,8 +719,8 @@ sub _lei_store ($;$) {
        my $cfg = _lei_cfg($self, $creat);
        $cfg->{-lei_store} //= do {
                require PublicInbox::LeiStore;
-               my $dir = $cfg->{'leistore.dir'};
-               $dir //= $creat ? store_path($self) : return;
+               my $dir = $cfg->{'leistore.dir'} // store_path($self);
+               return unless $creat || -d $dir;
                PublicInbox::LeiStore->new($dir, { creat => $creat });
        };
 }
--
unsubscribe: one-click, see List-Unsubscribe header
archive: https://public-inbox.org/meta/

Reply via email to