diff options
author | Eric Wong <e@80x24.org> | 2021-08-11 11:26:16 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-08-11 21:50:07 +0000 |
commit | 4c6f9a39621fdae852e0655b7db3d61f03c716c5 (patch) | |
tree | d91b297663320570c965e12f1bd32f100d56e34a /script | |
parent | 0bbfa2553c63fafca3a502a887c575bd8d401a0a (diff) | |
download | public-inbox-4c6f9a39621fdae852e0655b7db3d61f03c716c5.tar.gz |
None of our code elsewhere accounts for non-*nix pathnames and it's not worth our time to start. So stop wasting CPU cycles giving the illusion that we'd care about non-*nix pathnames.
Diffstat (limited to 'script')
-rwxr-xr-x | script/public-inbox-init | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/script/public-inbox-init b/script/public-inbox-init index 6fac4d18..ced88235 100755 --- a/script/public-inbox-init +++ b/script/public-inbox-init @@ -93,8 +93,7 @@ $ng =~ m![^A-Za-z0-9/_\.\-\~\@\+\=:]! and require PublicInbox::Config; my $pi_config = PublicInbox::Config->default_file; -require File::Basename; -my $dir = File::Basename::dirname($pi_config); +my ($dir) = ($pi_config =~ m!(.*?/)[^/]+\z!); require File::Path; File::Path::mkpath($dir); # will croak on fatal errors |