[Mono-bugs] [Bug 50842][Wis] New - System.IO.DirectoryInfo has broken ToString method.

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 12 Nov 2003 01:24:42 -0500 (EST)

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by gs234-mono-bugzilla@srcf.ucam.org.


--- shadow/50842	2003-11-12 01:24:41.000000000 -0500
+++ shadow/50842.tmp.21515	2003-11-12 01:24:42.000000000 -0500
@@ -0,0 +1,58 @@
+Bug#: 50842
+Product: Mono/Class Libraries
+Version: unspecified
+OS: unknown
+OS Details: Debian unstable of 2003-11-12
+Status: NEW   
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: gs234-mono-bugzilla@srcf.ucam.org               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: System.IO.DirectoryInfo has broken ToString method.
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+Steps to reproduce the problem:
+$ cat > test.cs
+using System;
+using System.IO;
+class Test
+  public static void Main ()
+  {
+    string path = "/a/b/c/d/e";
+    Console.WriteLine (new DirectoryInfo (path).ToString ());
+  }
+Actual Results:
+Expected Results:
+Additional Information:
+This is a distilled version of a problem that occurs when trying to run the
+SML.NET compiler from <http://www.cl.cam.ac.uk/Research/TSG/SMLNET/> under
+Mono.  The file smlnet/src/clr/getsysdir.cs uses Directory.GetParent on an
+absolute path and calls ToString on the result, expecting to get a usable,
+absolute directory path in return.  Instead, it gets the basename of the
+The MSDN documentation is a bit terse on the subject ("Get the orginial
+path as specified by the user"), but Mono is clearly not delivering
+expected behaviour here.