[Mono-list] problem with Directory::GetParent
Varga Zoltan
vargaz@freemail.hu
Thu, 23 Jan 2003 20:52:22 +0100 (CET)
Hi,
It seems that System.IO.Directory::GetParent() is broken, ie.
GetParent ("/a/b") returns "a/b"
The fix is to replace:
return new DirectoryInfo (Path.GetDirectoryName (path +
Path.DirectorySeparatorChar + ".."));
with:
return new DirectoryInfo (Path.GetDirectoryName (path))
Interestingly, that was the original definition of this
method, but a later
checkin changed it to the current incorrect version. Why
was that done?
Can I check this stuff in ?
bye
Zoltan