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

--- Comment #0 from Denis <> 2011-05-28 05:21:26 PDT 
getExt, getName and join doesn't support Windows's altsep, look at pull for
D2's phobos:

Confusing (for me) behaviour of functions:

1. isabs - from
: "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:
------- You are receiving this mail because: -------

Reply via email to