www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6068] New: std.path has some issues for Windows user

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6068

           Summary: std.path has some issues for Windows user
           Product: D
           Version: D1 & D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: verylonglogin.reg gmail.com



---
getExt, getName and join doesn't support Windows's altsep, look at pull for
D2's phobos:
https://github.com/D-Programming-Language/phobos/pull/63

Confusing (for me) behaviour of functions:

1. isabs - from
http://msdn.microsoft.com/en-us/library/aa365247%28v=vs.85%29.aspx
: "A single backslash, for example, "\directory" or "\file.txt". This is also
referred to as an absolute path." and in .NET Framework Path.IsPathRooted
returns true for such case, e.g. But I agree with phobos's way, and this
behaviour is clearly written in documentation. Have it your way. But it affects
next function.

2. join - if second path is "drive relative rooted":
assert( join(`a`, `\b`) == `\b` ); //good (like .NET Framework)
assert( join(`c:a`, `\b`) == `c:a\b` ); //why not `c:\b`?
assert( join(`c:\a`, `\b`) == `c:\a\b` ); //why not `c:\b`?

.NET Framework's Path.Combine for all cases shows `\b` (because `\b` is rooted
for it).

Possible solutions:
1. We don't want to know about Microsoft's stupid "drive relative rooted"
paths, let it be so:
assert( join(`a`, `\b`) == `a\b` );
assert( join(`c:a`, `\b`) == `c:a\b` );
assert( join(`c:\a`, `\b`) == `c:\a\b` );

2. We know about it:
assert( join(`a`, `\b`) == `\b` );
assert( join(`c:a`, `\b`) == `c:\b` );
assert( join(`c:\a`, `\b`) == `c:\b` );

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 28 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6068


Jonathan M Davis <jmdavisProg gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmdavisProg gmx.com



PDT ---
I would point out that Lars has revamped std.path, and his changes are likely
to be up for review sometime soon (I believe that dsimcha's TempAlloc stuff is
going to be reviewed first). And that's likely to change the behavior of some
of std.path's stuff. Your issues here may be totally fixed in the code that
Lars has done. So, I'm reluctant to spend time trying to fix what's currently
there. As long as the pull request is good, it'll probably get merged in, but
fixing the other issues should probably be left to Lars' changes, since I fully
expect some version of that to get through the review process. We should keep
these issues in mind however when Lars' changes are reviewed so that new code
handles them in whatever the best way is.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 28 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6068


Lars T. Kyllingstad <bugzilla kyllingen.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla kyllingen.net
         Resolution|                            |WONTFIX



14:31:36 PST ---
Marking this as "won't fix", since the functions in question will soon be
removed from Phobos.

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