about summary refs log tree commit homepage
path: root/lib/PublicInbox/OverIdx.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-08-11 11:26:16 +0000
committerEric Wong <e@80x24.org>2021-08-11 21:50:07 +0000
commit4c6f9a39621fdae852e0655b7db3d61f03c716c5 (patch)
treed91b297663320570c965e12f1bd32f100d56e34a /lib/PublicInbox/OverIdx.pm
parent0bbfa2553c63fafca3a502a887c575bd8d401a0a (diff)
downloadpublic-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 'lib/PublicInbox/OverIdx.pm')
-rw-r--r--lib/PublicInbox/OverIdx.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/OverIdx.pm b/lib/PublicInbox/OverIdx.pm
index 8f7cf2bb..e0893337 100644
--- a/lib/PublicInbox/OverIdx.pm
+++ b/lib/PublicInbox/OverIdx.pm
@@ -463,8 +463,8 @@ sub create {
         };
         unless (-r $fn) {
                 require File::Path;
-                require File::Basename;
-                File::Path::mkpath(File::Basename::dirname($fn));
+                my ($dir) = ($fn =~ m!(.*?/)[^/]+\z!);
+                File::Path::mkpath($dir);
         }
         # create the DB:
         PublicInbox::Over::dbh($self);