Showing "leistore.dir= already initialized" because $cur is
undefined isn't useful.
$dir //= _store_path($env);
$dir = File::Spec->rel2abs($dir, $env->{PWD}); # PWD is symlink-aware
my @cur = stat($cur) if defined($cur);
$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) {
my @dir = stat($dir);
my $exists = "I: leistore.dir=$cur already initialized" if @dir;
if (@cur) {