]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/LEI.pm
treewide: use *nix-specific dirname regexps
[public-inbox.git] / lib / PublicInbox / LEI.pm
index e6f763e1067869e0a7c6d3bb8a90e2b544f45e0d..be4754df8d162448fe9a81b69093d3242084f6d2 100644 (file)
@@ -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";