From 9d34783dbabe5acf76912324f8709c77e2a59b41 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Sun, 2 Sep 2007 21:44:24 +0000 Subject: [PATCH] Packages::DoSearchContents: Handle absolute path names correctly Avoid adding too many leading / for mode=exactfilename --- lib/Packages/DoSearchContents.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Packages/DoSearchContents.pm b/lib/Packages/DoSearchContents.pm index 2da76d6..3df473d 100644 --- a/lib/Packages/DoSearchContents.pm +++ b/lib/Packages/DoSearchContents.pm @@ -82,6 +82,7 @@ sub do_search_contents { if @keywords; my $kw = reverse $first_kw; + $kw =~ s{/+$}{}; # exact filename searching follows trivially: $kw = "$kw/" if $mode eq 'exactfilename'; -- 2.39.2