[Mono-list] problems with Directory::GetParent()

Varga Zoltan vargaz@freemail.hu
Sun, 26 Jan 2003 20:15:12 +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