Bugs item #1316021, was opened at 2005-10-07 14:16
Message generated for change (Comment added) made by brondsem
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=390117&aid=1316021&group_id=27350
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Browsing
Group: v0.9.4
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: Dave Brondsema (brondsem)
Summary: Search Error in 'feeble attempt to print possible errors'
Initial Comment:
I'm running LXR 0.9.4 with Swish-e, MySQL and Plain files.
In the swishsearch function in search, the line
print $hit, "<br>\n" if $hit =~ $hit =~ /No such file
or directory/; # feeble attempt to print possible
errors (e.g. incomplete LD_LIBRARY_PATH causes linking
errors)
doesn't really make sense to me. The conditional "$hit
=~ $hit =~ /No..." can never be TRUE. In fact, worse
than the fact that you can never get TRUE, you can
actually get errors. When $hit had a value of '347
/src/include/g++-3/stl.h "stl.h" 92379' I would get the
following error:
Nested quantifiers in regex; marked by <-- HERE in
m/347 /src/include/g++ <-- HERE -3/stl.h "stl.h" 92379
The ++ in /src/include/g++-3/stl.h causes the grief in
this case. I assumed other invalid rexexps in $hit
would cause similar issues. So I tried $hit = '347
/sdf/sdf/sdf/sdf/[$..---]/ "sdf" 324234' and received:
Invalid [] range ".--" in regex; marked by <-- HERE in
m/347 /sdf/sdf/sdf/sdf/[$..-- <-- HERE -]/ "sdf" 324234
Patch for search 0.9.4
===================
--- search 2005-10-07 14:03:29.000000000 -0400
+++ search.orig 2005-10-07 14:02:00.000000000 -0400
@@ -162,7 +162,7 @@
if ($retval == 0) {
my $numlines = 0;
foreach my $hit (@result) {
- print $hit, "<br>\n" if $hit =~
/No such file or directory/; # feeble attempt to
print possible errors (e.g. incomplete LD_LIBRARY_PATH
causes linking errors)
+ print $hit, "<br>\n" if $hit =~
$hit =~ /No such file or directory/; # feeble
attempt to print possible errors (e.g. incomplete
LD_LIBRARY_PATH causes linking errors)
next if $hit =~ /^err:/; #
skip; only 'no results' errors happen with return value 0
my ($score, $file) = $hit =~
/^(\d+) \/(.+) "(.+)" \d+/;
----------------------------------------------------------------------
>Comment By: Dave Brondsema (brondsem)
Date: 2005-10-07 17:38
Message:
Logged In: YES
user_id=341298
Fixed, thanks.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=390117&aid=1316021&group_id=27350
|