From 5634e8331cb8782944a258a12e1f9857dfb1c8e1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 11 Aug 2021 11:26:18 +0000 Subject: lei: attempt to canonicalize away "/../" pathnames As documented, File::Spec->canonpath does not canonicalize "/../". While we want to do our best to preserve symlinks in pathnames, leaving "/../" can mislead our inotify|kqueue usage. --- lib/PublicInbox/LeiOverview.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/LeiOverview.pm') diff --git a/lib/PublicInbox/LeiOverview.pm b/lib/PublicInbox/LeiOverview.pm index e4242d9b..223db222 100644 --- a/lib/PublicInbox/LeiOverview.pm +++ b/lib/PublicInbox/LeiOverview.pm @@ -76,7 +76,7 @@ sub new { $fmt //= $devfd >= 0 ? 'json' : (detect_fmt($lei, $dst) or return); if (index($dst, '://') < 0) { # not a URL, so assume path - $dst = File::Spec->canonpath($dst); + $dst = $lei->canonpath_harder($dst); } # else URL my $self = bless { fmt => $fmt, dst => $dst }, $class; -- cgit v1.2.3-24-ge0c7