[Mono-bugs] [Bug 38397][Nor] New - DirectoryInfo.Parent returns invalid root directory

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Thu, 20 Feb 2003 10:01:37 -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 bugs@mbalz.de.


--- shadow/38397	Thu Feb 20 10:01:37 2003
+++ shadow/38397.tmp.6266	Thu Feb 20 10:01:37 2003
@@ -0,0 +1,47 @@
+Bug#: 38397
+Product: Mono/Runtime
+Version: unspecified
+OS Details: Debian Sid
+Status: NEW   
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: bugs@mbalz.de               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: DirectoryInfo.Parent returns invalid root directory
+Description of Problem:
+DirectoryInfo.Parent returns invalid root directory.
+System.ArgumentException is thrown.
+Steps to reproduce the problem:
+Run the following code:
+DirectoryInfo dir = new DirectoryInfo ("/home");
+dir = dir.Parent;
+Console.Out.WriteLine (dir.Parent.ToString ());
+Actual Results:
+When changing the dir (second line) the following exception is thrown:
+Unhandled Exception: System.ArgumentException: The path is not of a legal form
+Parameter name: path
+in <0x00091> 00 System.IO.Path:GetFullPath (string)
+in <0x0005f> 00 System.IO.DirectoryInfo:.ctor (string)
+in <0x00066> 00 System.IO.DirectoryInfo:get_Parent ()
+in <0x00102> 00 .ExistTest:Main (string[])
+Expected Results:
+Console Output should be "/"
+How often does this happen? 
+Additional Information:
+Mono 0.19 on current Debian Sid