Update of /cvsroot/lxr/lxr/lib/LXR
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28725/lib/LXR
Modified Files:
Common.pm
Log Message:
Fix bug [ 1720862 ] Filename with space reports does not exist
Add whitespace to allowed list of characters in pathname.
Index: Common.pm
===================================================================
RCS file: /cvsroot/lxr/lxr/lib/LXR/Common.pm,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- Common.pm 20 Dec 2006 19:57:56 -0000 1.58
+++ Common.pm 23 Mar 2009 16:43:08 -0000 1.59
@@ -538,7 +538,8 @@
if(defined $path) {
# First suppress anything after a dodgy character
- $path =~ s!(^[\w_+\-,\.%\^/\!]+).*!$1!;
+ # Match good chars from start of string, then replace entire string with only good chars
+ $path =~ s!(^[\w\s_+\-,\.%\^/\!]+).*!$1!;
# Clean out /../
while ($path =~ m!/\.\.?/!) {
$path =~ s!/\.\.?/!/!g;
@@ -820,7 +821,7 @@
$template = <TEMPL>;
close(TEMPL);
} else {
- warning("Template " . $config->value($tmplname) . " does not exist.");
+ warning("Template " . $config->value($tmplname) . " does not exist in ".`pwd`);
}
}
@@ -865,7 +866,7 @@
$template = <TEMPL>;
close(TEMPL);
} else {
- warning("Template " . $config->value($tmplname) . " does not exist.");
+ warning("Template " . $config->value($tmplname) . " does not exist in ".`pwd`);
}
}
|