about summary refs log tree commit homepage
path: root/lib/PublicInbox/LEI.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/LEI.pm')
-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 e6f763e1..be4754df 100644
--- a/lib/PublicInbox/LEI.pm
+++ b/lib/PublicInbox/LEI.pm
@@ -798,7 +798,7 @@ sub _lei_cfg ($;$) {
                         delete $self->{cfg};
                         return bless {}, 'PublicInbox::Config';
                 }
-                my (undef, $cfg_dir, undef) = File::Spec->splitpath($f);
+                my ($cfg_dir) = ($f =~ m!(.*?/)[^/]+\z!);
                 -d $cfg_dir or mkpath($cfg_dir) or die "mkpath($cfg_dir): $!\n";
                 open my $fh, '>>', $f or die "open($f): $!\n";
                 @st = stat($fh) or die "fstat($f): $!\n";