[Mono-bugs] [Bug 55938][Wis] New - Problem with SystemIO.DirectoryInfo and "/".

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 22 Mar 2004 23:41:33 -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 erik@bagfors.nu.

http://bugzilla.ximian.com/show_bug.cgi?id=55938

--- shadow/55938	2004-03-22 23:41:33.000000000 -0500
+++ shadow/55938.tmp.9172	2004-03-22 23:41:33.000000000 -0500
@@ -0,0 +1,54 @@
+Bug#: 55938
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: erik@bagfors.nu               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Problem with SystemIO.DirectoryInfo and "/".
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem: When using System.IO.DirectoryInfo it doesn't work
+if path is "/".
+
+
+Steps to reproduce the problem:
+1. Compile this test-program
+
+using System;
+using System.IO;
+
+class Test {
+    public static void Main (string[] args) {
+	string dir = args[0];
+	Console.WriteLine("Getting directory info for " + dir);
+	DirectoryInfo di = new DirectoryInfo(dir);
+	Console.WriteLine("Directories are:");
+	foreach(DirectoryInfo ddi in di.GetDirectories()) {
+	    Console.WriteLine(ddi.Name);
+	}
+	Console.WriteLine("\nFiles are:");
+	foreach(FileInfo fi in di.GetFiles()) {
+	    Console.WriteLine(fi.Name);
+	}
+    }
+}
+
+2. run it with the option "/tmp" or whatever, that works 
+3. run it with the option "/" and se 
+Unhandled Exception: System.ArgumentException: The Path do not have a valid
+format
+
+I haven't been able to see if this is fixed in the latest mono as well.
+
+/Erik