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

 
 

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

Submitted by:  Mike Frysinger <vapier>
Submitted on:  Tue 17 Feb 2015 11:53:53 PM UTC  
 
Severity: 3 - NormalStatus: Fixed
Assigned to: Benno Schulenberg <bens>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

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

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Tue 28 Apr 2015 07:23:20 PM UTC, comment #2:

Fixed in SVN, r5218.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 28 Apr 2015 07:23:20 PM UTCbensStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Sun 19 Apr 2015 10:52:30 AM UTCbensAttached File-=>Added match-canonical-filename.patch, #33716
      Assigned toNone=>bens

    Back to the top


    Powered by Savane 3.1-cleanup1