[Mono-bugs] [Bug 81577][Cri] New - DirectoryInfo.GetDirectories returns directories for current directory

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed May 9 10:23:09 EDT 2007

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 miguel at ximian.com.


--- shadow/81577	2007-05-09 10:23:09.000000000 -0400
+++ shadow/81577.tmp.29585	2007-05-09 10:23:09.000000000 -0400
@@ -0,0 +1,38 @@
+Bug#: 81577
+Product: Mono: Runtime
+Version: 1.2
+OS Details: 
+Status: NEW   
+Priority: Critical
+Component: io-layer
+AssignedTo: dick at ximian.com                            
+ReportedBy: miguel at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: DirectoryInfo.GetDirectories returns directories for current directory
+DirectoryInfo.GetDirectories on trunk is returning the directory listing
+for the current directory, not the directory listing for the directory it
+was requested.
+using System.IO;
+using System;
+class X {
+	static void Main (string [] args)
+	{
+		DirectoryInfo dir = new DirectoryInfo ("/home");
+		foreach (DirectoryInfo subdir in dir.GetDirectories ()) {
+			Console.WriteLine ("Got: {0}", subdir);
+		}
+	}
+If you run this program in /tmp, the output should be the listing of the
+directories in the home directory, instead it is a directory listing of tmp/

More information about the mono-bugs mailing list