]> Sergey Matveev's repositories - public-inbox.git/commitdiff
extsearch*: drop unnecessary path canonicalization
authorEric Wong <e@80x24.org>
Mon, 21 Dec 2020 07:51:22 +0000 (07:51 +0000)
committerEric Wong <e@80x24.org>
Mon, 21 Dec 2020 21:51:59 +0000 (21:51 +0000)
Unlike inboxdir, the canonical-ness of -extindex paths is not
relevant at the moment, and may never be relevant at all.  So
don't mislead others into thinking these paths being
canonicalized matters.

lib/PublicInbox/ExtSearch.pm
lib/PublicInbox/ExtSearchIdx.pm

index 2a560935e7c7a0ad27458058e65155348b99e69e..a2b97798bae9da6298ecc6da6b443092b582f0bc 100644 (file)
@@ -9,7 +9,6 @@ use strict;
 use v5.10.1;
 use PublicInbox::Over;
 use PublicInbox::Inbox;
-use File::Spec ();
 use PublicInbox::MiscSearch;
 use DBI qw(:sql_types); # SQL_BLOB
 
@@ -18,7 +17,6 @@ use parent qw(PublicInbox::Search);
 
 sub new {
        my (undef, $topdir) = @_;
-       $topdir = File::Spec->canonpath($topdir);
        bless {
                topdir => $topdir,
                # xpfx => 'ei15'
index c4b429df0cf8b5c8e71642d9e2d677837574d15e..f04e044382fca72cef422fa1411b5dde23cefeab 100644 (file)
@@ -30,13 +30,11 @@ use PublicInbox::V2Writable;
 use PublicInbox::InboxWritable;
 use PublicInbox::ContentHash qw(content_hash);
 use PublicInbox::Eml;
-use File::Spec;
 use PublicInbox::DS qw(now);
 use DBI qw(:sql_types); # SQL_BLOB
 
 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";