about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-01-04 04:16:24 +0000
committerEric Wong <e@80x24.org>2021-01-04 19:00:48 +0000
commit1ac1b90339670ac06c30d800548e018e6f425982 (patch)
treefd2fc099b865ef10e064f1de7df5db10a98952ed /lib
parent2ea2b609f46a51bab56bccb7cbc93c27b8a3b5a6 (diff)
downloadpublic-inbox-1ac1b90339670ac06c30d800548e018e6f425982.tar.gz
Showing "leistore.dir= already initialized" because $cur is
undefined isn't useful.
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/LEI.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm
index 50453dde..9a3b1ee3 100644
--- a/lib/PublicInbox/LEI.pm
+++ b/lib/PublicInbox/LEI.pm
@@ -505,7 +505,7 @@ sub lei_init {
         $dir //= _store_path($env);
         $dir = File::Spec->rel2abs($dir, $env->{PWD}); # PWD is symlink-aware
         my @cur = stat($cur) if defined($cur);
-        $cur = File::Spec->canonpath($cur) if $cur;
+        $cur = File::Spec->canonpath($cur // $dir);
         my @dir = stat($dir);
         my $exists = "I: leistore.dir=$cur already initialized" if @dir;
         if (@cur) {