[Lxr-dev] [ lxr-Bugs-1213449 ] File and directory names that contain dashes fail.
Brought to you by:
ajlittoz
From: SourceForge.net <no...@so...> - 2005-09-09 22:09:42
|
Bugs item #1213449, was opened at 2005-06-02 13:10 Message generated for change (Comment added) made by mbox You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=390117&aid=1213449&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: badlydrawnbhoy (badlydrawnbhoy) >Assigned to: Malcolm Box (mbox) Summary: File and directory names that contain dashes fail. Initial Comment: 1. List a directory, and then 2. Attempt to select or file or sub-directory whose name contains a '-'. Say, for example's sake, 'groups-list.c'. 3. An error stating that file 'groups' (using our example) does not exist is displayed. ---------------------------------------------------------------------- Comment By: Malcolm Box (mbox) Date: 2005-09-09 23:09 Message: Logged In: YES user_id=215386 This has now been fixed in CVS. If you can install the new version and check that it solves your problem, then it would be very useful. Thanks for reporting this defect and helping to make LXR better. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2005-07-14 13:10 Message: Logged In: NO sorry, the patch below reversed by mistaken ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2005-07-14 13:07 Message: Logged In: NO I've found where the problem is: lxr-0.9.4/lib/LXR/Common.pm if(defined $path) { # First suppress anything after a dodgy character - $path =~ s!(^[\w_+\-,.%^/]+).*!$1!; + $path =~ s!(^[\w_+-,.%^/]+).*!$1!; # Clean out /../ - while ($path =~ m!/\.\./!) { + while ($path =~ m!/../!) { $path = s!/\.\./!/!g; } } ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2005-06-30 17:13 Message: Logged In: NO Had the same issue, in sub clean_path the regexp to clean out anything after dodgy characters needs \ (backslash) escapes for - (minus) and . (dot) at least. Seems to work for me now. feedback to t.lehnig <at> gmx <dot> de ---------------------------------------------------------------------- Comment By: badlydrawnbhoy (badlydrawnbhoy) Date: 2005-06-02 16:22 Message: Logged In: YES user_id=1285009 Hi, I'm using 0.9.4, but that doesn't appear in the dropdown list as far as I can see. Cheers Paul ---------------------------------------------------------------------- Comment By: Malcolm Box (mbox) Date: 2005-06-02 16:05 Message: Logged In: YES user_id=215386 Please can you update this bug with which version of LXR you are using? Thanks, Malcolm ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=390117&aid=1213449&group_id=27350 |