[Issue 9530] New: std.path should have a function for getting the canonical path to a file or directory

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Feb 17 23:12:57 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9530

           Summary: std.path should have a function for getting the
                    canonical path to a file or directory
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: jmdavisProg at gmx.com


--- Comment #0 from Jonathan M Davis <jmdavisProg at gmx.com> 2013-02-17 23:12:56 PST ---
Take this example from std.path.absolutePath:

assert (absolutePath("../file", "/foo/bar")    == "/foo/bar/../file");

Note the ../ in the path. absolutePath does note return the canonical path
(which is what I would have expected it to do), but even if it's better for
absolutePath to not return the canonical path, we still need a function which
will do that, and I don't see one in std.path which does.

So, I think that either absolutePath should be changed to return the canonical
path (which presumably it has a good reason for not doing), or std.path needs a
new function which does.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list