]> git.deb.at Git - deb/packages.git/commitdiff
Packages::DoSearchContents: Handle absolute path names correctly
authorFrank Lichtenheld <frank@lichtenheld.org>
Sun, 2 Sep 2007 21:44:24 +0000 (21:44 +0000)
committerFrank Lichtenheld <frank@lichtenheld.de>
Sun, 2 Sep 2007 22:01:05 +0000 (22:01 +0000)
Avoid adding too many leading / for mode=exactfilename

lib/Packages/DoSearchContents.pm

index 2da76d6c8e03c1976733e9eefbcbfb65f0053a7c..3df473da5f5c5e30c8413506edbbc8f6c2a28719 100644 (file)
@@ -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';