From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 24F6C1FA1A for ; Mon, 21 Dec 2020 07:51:23 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 5/5] extsearch*: drop unnecessary path canonicalization Date: Mon, 21 Dec 2020 07:51:22 +0000 Message-Id: <20201221075122.1587-6-e@80x24.org> In-Reply-To: <20201221075122.1587-1-e@80x24.org> References: <20201221075122.1587-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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 | 2 -- lib/PublicInbox/ExtSearchIdx.pm | 2 -- 2 files changed, 4 deletions(-) diff --git a/lib/PublicInbox/ExtSearch.pm b/lib/PublicInbox/ExtSearch.pm index 2a560935..a2b97798 100644 --- a/lib/PublicInbox/ExtSearch.pm +++ b/lib/PublicInbox/ExtSearch.pm @@ -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' diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm index c4b429df..f04e0443 100644 --- a/lib/PublicInbox/ExtSearchIdx.pm +++ b/lib/PublicInbox/ExtSearchIdx.pm @@ -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";