#23 Add function for comparing pathnames

open
nobody
5
2012-12-21
2005-11-07
Kimmo Varis
No

As I first mentioned in bug item #1327413 Fix bug in
CDirDoc::AllowUpwardDirectory()
https://sourceforge.net/tracker/?func=detail&atid=313216&aid=1327413&group_id=13216

we should have function for pathname compare. There has
been many bugs where we do case-sensitive compare for
paths. That may cause hard to track bugs and problems.

So my suggestion is to add function, named (for example)
paths_compareNames() and use that whenever we compare
pathnames.

Discussion

  • elsapo

    elsapo - 2005-12-07

    Logged In: YES
    user_id=1195173

    To really get this right, you should probably get canonical
    versions of both and then compare them -- viz. paths.cpp,
    GetDirName.

    (Granted, that still doesn't get hardlinks or mapped drives
    that are the same, but I don't think those are easy enough
    to solve.)

     
  • elsapo

    elsapo - 2006-01-09

    Logged In: YES
    user_id=1195173

    What about comparing extensions? New function
    paths_compareExtenstions, or just pass them to
    paths_CompareNames as well?

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks