From: Frank Lichtenheld Date: Sun, 2 Sep 2007 21:44:24 +0000 (+0000) Subject: Packages::DoSearchContents: Handle absolute path names correctly X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=9d34783dbabe5acf76912324f8709c77e2a59b41;p=deb%2Fpackages.git Packages::DoSearchContents: Handle absolute path names correctly Avoid adding too many leading / for mode=exactfilename --- 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';