Update and problem with std.path.isabs() - Re: createPath()
Chris Miller
chris at dprogramming.com
Fri Dec 8 18:29:28 PST 2006
Updated how it handles network share paths:
http://paste.dprogramming.com/dpilny6l.php
After testing with network shares I realized that std.path.isabs() should
probably test for network share paths and consider them absolute.
Consider the following, which I often do:
if(!std.path.isabs(mypath))
mypath = std.path.join(getcwd(), mypath);
where mypath is `\\foo\bar`
Fix for isabs:
version(Windows)
{
if(path.length >= 2 && r"\\" == path[0 .. 2])
return true;
}
// ..continue with existing code..
More information about the Digitalmars-d
mailing list