about summary refs log tree commit homepage
path: root/lib/PublicInbox
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-11-07 10:56:57 +0000
committerEric Wong <e@80x24.org>2020-11-08 10:18:20 +0000
commita381e4acc9070bad6490b83173687a4f0e142627 (patch)
tree223bfa0aaa28f8244ed4e4186846377890eabf92 /lib/PublicInbox
parent03aa0e9fd11d2b5cf0b7352310da4f7748b76bbb (diff)
downloadpublic-inbox-a381e4acc9070bad6490b83173687a4f0e142627.tar.gz
This makes `ps' output look a bit nicer if there's trailing
slashes involved from the command-line.
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r--lib/PublicInbox/ExtSearch.pm2
-rw-r--r--lib/PublicInbox/ExtSearchIdx.pm1
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/PublicInbox/ExtSearch.pm b/lib/PublicInbox/ExtSearch.pm
index 66c99eaa..eb665027 100644
--- a/lib/PublicInbox/ExtSearch.pm
+++ b/lib/PublicInbox/ExtSearch.pm
@@ -9,12 +9,14 @@ use strict;
 use v5.10.1;
 use PublicInbox::Over;
 use PublicInbox::Inbox;
+use File::Spec ();
 
 # for ->reopen, ->mset, ->mset_to_artnums
 use parent qw(PublicInbox::Search);
 
 sub new {
         my (undef, $topdir) = @_;
+        $topdir = File::Spec->canonpath($topdir);
         bless {
                 topdir => $topdir,
                 # xpfx => 'ei15'
diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm
index 2bb9afce..3e7f5604 100644
--- a/lib/PublicInbox/ExtSearchIdx.pm
+++ b/lib/PublicInbox/ExtSearchIdx.pm
@@ -30,6 +30,7 @@ use File::Spec;
 
 sub new {
         my (undef, $dir, $opt) = @_;
+        $dir = File::Spec->canonpath($dir);
         my $l = $opt->{indexlevel} // 'full';
         $l !~ $PublicInbox::SearchIdx::INDEXLEVELS and
                 die "invalid indexlevel=$l\n";