Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
January 02, 2009 [Issue 2552] New: std.path.isabs broken for Windows | ||||
---|---|---|---|---|
| ||||
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. -- |
January 03, 2009 [Issue 2552] std.path.isabs broken for Windows | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2552 ------- Comment #1 from andrei@metalanguage.com 2009-01-02 19:21 ------- (In reply to comment #0) > 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.) -- |
January 03, 2009 [Issue 2552] std.path.isabs broken for Windows | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2552 ------- Comment #2 from jarrett.billingsley@gmail.com 2009-01-02 19:48 ------- 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. -- |
October 11, 2009 [Issue 2552] std.path.isabs broken for Windows | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | 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: ------- |
September 26, 2010 [Issue 2552] std.path.isabs broken for Windows | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2552 Andrei Alexandrescu <andrei@metalanguage.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |INVALID --- Comment #3 from Andrei Alexandrescu <andrei@metalanguage.com> 2010-09-26 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: ------- |
Copyright © 1999-2021 by the D Language Foundation