bugGNU nano - Bugs: bug #44288, path argument in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #44288: path argument in "syntax" field operates on the path specified by user rather than full path

Submitter:  Mike Frysinger <vapier>
Submitted:  Tue 17 Feb 2015 11:53:53 PM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Mon 29 Feb 2016 04:18:29 PM UTC, comment #3: 

The fix has an unwanted side effect: bug #47307.

Benno Schulenberg <bens>
Group administrator
Tue 28 Apr 2015 07:23:20 PM UTC, comment #2: 

Fixed in SVN, r5218.

Benno Schulenberg <bens>
Group administrator
Sun 19 Apr 2015 10:52:30 AM UTC, comment #1: 

With attached patch it works for me.  Comments welcome.

(file #33716)

Benno Schulenberg <bens>
Group administrator
Tue 17 Feb 2015 11:53:53 PM UTC, original submission:  

if you use the "syntax" keyword to colorize files and try to do it against files that live under a specific directory, then the logic fails when it tries to match.

an example:
 syntax "foo" "/tmp/path/.*\.cow"

if you were to edit a file like:
 nano /tmp/path/fat.cow
it would match

but if you did instead:
 cd /tmp/path
 nano fat.cow

it would not.  i think we need to leverage getcwd() and canonicalize_file_name() to get this right.  we don't want to resolve symlinks since that might change the intermediate dir paths and the final path itself.

Mike Frysinger <vapier>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Updated the item)
  • -email is unavailable- added by vapier (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-04-28 bens StatusNone Fixed
        Open/ClosedOpen Closed
    2015-04-19 bens Attached File- Added match-canonical-filename.patch, #33716
        Assigned toNone bens

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code