X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=lib%2FPackages%2FDoSearchContents.pm;h=debbbb2a93e28539aef61f66556ae17871080c85;hb=f26361c6f851af80678295e935d48d8f3ee76927;hp=1be7d441cc90e25c6da65a0b855a2916d809e8ff;hpb=aee28210328cf1867daba3d397bf77d0baa24ccc;p=deb%2Fpackages.git diff --git a/lib/Packages/DoSearchContents.pm b/lib/Packages/DoSearchContents.pm index 1be7d44..debbbb2 100644 --- a/lib/Packages/DoSearchContents.pm +++ b/lib/Packages/DoSearchContents.pm @@ -173,8 +173,15 @@ sub searchfile last unless index($key, $kw) == 0; debug( "found $key", 2 ) if DEBUG; - my @hits = split /\0/o, $value; - push @$results, [ scalar reverse($key), @hits ]; + my @files = split /\001/o, $value; + foreach my $f (@files) { + my @hits = split /\0/o, $f; + my $file = shift @hits; + if ($file eq '-') { + $file = reverse($key); + } + push @$results, [ $file, @hits ]; + } last if ($$nres)++ > 100; }