[Lxr-dev] [ lxr-Bugs-1297957 ] Filenames containing "-" are cut off when browsing
Brought to you by:
ajlittoz
From: SourceForge.net <no...@so...> - 2005-09-21 18:38:23
|
Bugs item #1297957, was opened at 2005-09-21 10:18 Message generated for change (Comment added) made by tyreld You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=390117&aid=1297957&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: Open Resolution: None Priority: 5 Submitted By: Tyrel Datwyler (tyreld) Assigned to: Nobody/Anonymous (nobody) Summary: Filenames containing "-" are cut off when browsing Initial Comment: This happens with both files and directories. For example: Assume I have a directory called "cmpi-base". Now if I attempt to change to that directory I get an error saying "The file /cmpi does not exist". The same happens for plain files such as "sfcb.init-suse.in" which will error with "The file /sfcb.init-suse.in does not exist". My initial guess looking at the code would be that the "source" perl code doesn't not properly account for all legal filename characters. ---------------------------------------------------------------------- >Comment By: Tyrel Datwyler (tyreld) Date: 2005-09-21 11:38 Message: Logged In: YES user_id=640104 I just noticed a typo in my summary. The error with "sfcb.init-suse.in" should be "The file /sfcb.init does not exist." ---------------------------------------------------------------------- Comment By: Tyrel Datwyler (tyreld) Date: 2005-09-21 11:36 Message: Logged In: YES user_id=640104 Something funky about the regular expression in the clean_path subroutine in Common.pm was causing the problem. Commenting out the whole line fixed the problem. Here is the patch. --- ./lib/LXR/Common.pm 2005-09-21 11:27:07.861639000 -0700 +++ /srv/www/lxr/lib/LXR/Common.pm 2005-09-21 11:22:09.108056448 -0700 @@ -540,7 +540,7 @@ if(defined $path) { # First suppress anything after a dodgy character - $path =~ s!(^[\w_+-,.%^/]+).*!$1!; + #$path =~ s!(^[\w_+-,.%^/]+).*!$1!; # Clean out /../ while ($path =~ m!/../!) { $path = s!/\.\./!/!g; ---------------------------------------------------------------------- Comment By: Tyrel Datwyler (tyreld) Date: 2005-09-21 10:28 Message: Logged In: YES user_id=640104 I am currently using MySQL 4.0.18 as the DB backend and I am indexing plain files. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=390117&aid=1297957&group_id=27350 |