Bug 6127 – std.path.dirname returns the incorrect directory

Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
Other
OS
Mac OS X
Creation time
2011-06-08T13:56:00Z
Last change time
2011-06-08T13:59:33Z
Assigned to
nobody
Creator
robert

Comments

Comment #0 by robert — 2011-06-08T13:56:20Z
The assertion: ---- import std.path void main() { assert(dirname("./foo/bar") == "./foo"); } ---- fails, as dirname currently returns '.'. This is inconsistent with the dirname utility, and is not the correct behaviour.
Comment #1 by robert — 2011-06-08T13:59:33Z
This bug is invalid, sorry. I neglected to check the arguments to the function were what I expected them to be.