digitalmars.D.bugs - [Issue 2552] New: std.path.isabs broken for Windows
- d-bugmail puremagic.com (26/26) Jan 02 2009 http://d.puremagic.com/issues/show_bug.cgi?id=2552
 - d-bugmail puremagic.com (6/11) Jan 02 2009 http://d.puremagic.com/issues/show_bug.cgi?id=2552
 - d-bugmail puremagic.com (7/7) Jan 02 2009 http://d.puremagic.com/issues/show_bug.cgi?id=2552
 - d-bugmail puremagic.com (10/10) Oct 11 2009 http://d.puremagic.com/issues/show_bug.cgi?id=2552
 - d-bugmail puremagic.com (11/11) Sep 26 2010 http://d.puremagic.com/issues/show_bug.cgi?id=2552
 
http://d.puremagic.com/issues/show_bug.cgi?id=2552
           Summary: std.path.isabs broken for Windows
           Product: D
           Version: 1.030
          Platform: PC
               URL: http://www.digitalmars.com/d/1.0/phobos/std_path.html
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Phobos
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: darkuranium gmail.com
std.path.isabs(char[]) falsely reports paths as relative when they are, indeed,
absolute. For example:
isabs("/test") => 0 (should be 1)
isabs("\test") => 0 (should be 1)
Here is the program I used to test this -- see the comments in the source for
instructions (they are importaint):
http://paste.dprogramming.com/dpavbrtf
As you can see, although all paths are reported as relative, they are indeed
absolute.
This is visible by the fact that main.d cannot find test-rel which lies in the
same dir as the program itself.
It can, however find test-abs, which lies the root of the drive.
-- 
 Jan 02 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2552
 std.path.isabs(char[]) falsely reports paths as relative when they are, indeed,
 absolute. For example:
 
 isabs("/test") => 0 (should be 1)
 isabs("\test") => 0 (should be 1)
The drives are lacking. In Windows terminology, does a drive-less path still
qualify as absolute? (I looked around MSDN, couldn't find a good definition.)
-- 
 Jan 02 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2552 It's tricky. Windows accepts such paths, and they are absolute to the current drive, but relative to the entire filesystem. Since the same path (like "\foo\bar\baz.txt") can refer to different files based on what the current drive is set to, I guess it's still relative, in which case Phobos is right. --
 Jan 02 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2552
Andrei Alexandrescu <andrei metalanguage.com> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |andrei metalanguage.com
         AssignedTo|nobody puremagic.com        |andrei metalanguage.com
-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
 Oct 11 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2552
Andrei Alexandrescu <andrei metalanguage.com> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |INVALID
14:22:27 PDT ---
I'll close this considering that isabs is correct as is.
-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
 Sep 26 2010








 
 
 
 d-bugmail puremagic.com 