Package: lxr-cvs
Version: 0.9.4.0.20071020-1
Severity: important
Tags: patch


When a version contains regexp meta-characters (eg: '+' '*' etc...), glimpse 
search results displays full path 
of files, instead of removing heading sourcepath. The regexp removing this must 
escape sourcepath string.

Attached patch fix this.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.24-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages lxr-cvs depends on:
ii  apache2                       2.2.8-3    Next generation, scalable, extenda
ii  apache2-mpm-worker [httpd-cgi 2.2.8-3    High speed threaded model for Apac
ii  exuberant-ctags               1:5.7-3    build tag file indexes of source c
ii  libfile-mmagic-perl           1.27-1     Perl module to guess file type
ii  perl [perl5]                  5.8.8-12   Larry Wall's Practical Extraction 

Versions of packages lxr-cvs recommends:
ii  libdbd-mysql-perl             4.006-1    A Perl5 database interface to the 
ii  mysql-server                  5.0.51a-3  MySQL database server (meta packag
ii  mysql-server-5.0 [mysql-serve 5.0.51a-3  MySQL database server binaries

-- no debconf information
diff -Npur a/search b/search
--- a/search    2006-04-08 15:37:57.000000000 +0200
+++ b/search    2008-03-27 16:47:35.000000000 +0100
@@ -112,7 +112,7 @@ sub glimpsesearch {
                foreach my $glimpseline (@glimpselines) {
                        last if ($i > $maxhits);
 
-                       $glimpseline =~ s/$sourceroot//;
+                       $glimpseline =~ s/\Q$sourceroot//;
                        my ($file, $line, $text) = $glimpseline =~ 
/(.*?):\s*(\d+)\s*:(.*)/;
                        next if $filetext and !filename_matches($filetext, 
$advanced, $casesensitive, $file);
 

Reply via email to