Help save net neutrality! Learn more.
Close

#62 bugs in tags.c/normalizePathname

release
closed-fixed
Program (402)
4
2001-09-05
2001-08-17
No

Function normalizePathname() in source/tags.c
doesn't work correctly.
Example1:
1. generate a tags File: <existing_dir>/tags
2. Set X-Resource
nedit.tagFile: <existing_dir>/dummy/../tags
3. Start nedit.
--> <existing_dir>/tags isn't load, because
normalizePathname() generates
<existing_dir>/dummy/<RANDOM CHAR>ags
No attempt is made in normalizePathname() to remove
dummy/, just ../ is to be removed!

Example2:
1. generate a tags File: <existing_dir>/tags
2. Set X-Resource
nedit.tagFile: <existing_dir>/./tags
3. Start nedit.
--> <existing_dir>/tags isn't load, because
normalizePathname() generates
<existing_dir>/<RANDOM CHAR>ags

<RANDOM CHAR> is comes from the initial contens of
result[] in normalizePathname()

Fix: Probably it's better to use NormalizePathname and
CompressPathname from util/fileUtils.c.
I proposed a complete fix (including a diff file)
yesterday in nedit patch #451505. Description see
there. The diff is appended below again (here as
context diff)

Markus Schwarzenberg

Discussion

  • Markus Schwarzenberg

    patch for bug tags.c/normalizePathname, same as in nedit patch #451505

     
  • Alexander Mai

    Alexander Mai - 2001-08-19
    • priority: 5 --> 4
    • status: open --> open-postponed
     
  • Alexander Mai

    Alexander Mai - 2001-08-19

    Logged In: YES
    user_id=15180

    Main part of this patch won't be applied, but postponed for 5.3/6.0.
    New behaviour might be triggered by an X resource.

     
  • Alexander Mai

    Alexander Mai - 2001-08-25

    Logged In: YES
    user_id=15180

    Ok, the patch item has been closed, a part
    of this fix is in, but doesn't help for this
    specific bug :-)
    IIRC we agreed on making this feature
    optional via an X resource. If you submit a
    diff against the main trunk (NOT the beta
    branch) I'll commit it.

     
  • Alexander Mai

    Alexander Mai - 2001-08-25
    • labels: --> Program
    • assigned_to: nobody --> amai
     
  • Markus Schwarzenberg

    Logged In: YES
    user_id=81393

    Here is the diff again against the main cvs trunk.
    Additions: X Resource alwaysCheckRelativeTagsSpecs
    (defaulting to True) to activate the new behavior
    (check the relative path for every new opened file,
    not only on NEdit startup) and a short description
    in help.c

     
  • Markus Schwarzenberg

    patch for alwaysCheckRelativeTagsSpecs and bug tags.c/normalizePathname

     
  • Alexander Mai

    Alexander Mai - 2001-09-05
    • status: open-postponed --> closed-fixed
     
  • Alexander Mai

    Alexander Mai - 2001-09-05

    Logged In: YES
    user_id=15180

    Just applied it ...
    I suggest to close this report. For further feature requests
    or bug reports please open up new ones!

     

Log in to post a comment.