[Mono-bugs] [Bug 58581][Wis] New - MonoIO.FindFirstFile() and FindNextFile() returns ".\.." and ".\.." on Windows

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 16 May 2004 16:28:08 -0400 (EDT)

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 atsushi@ximian.com.


--- shadow/58581	2004-05-16 16:28:08.000000000 -0400
+++ shadow/58581.tmp.31986	2004-05-16 16:28:08.000000000 -0400
@@ -0,0 +1,47 @@
+Bug#: 58581
+Product: Mono: Runtime
+Version: unspecified
+OS Details: winXP
+Status: NEW   
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: atsushi@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: MonoIO.FindFirstFile() and FindNextFile() returns ".\.." and ".\.." on Windows
+Unlike mono on Linux, ves_icall_System_IO_MonoIO_FindFirstFile() returns
+"." and ".." directories under Windows. Am not sure at which layer this
+happens, but at least MonoIO.FindFirstFile() and MonoIO.FindNextFile()
+return such entries.
+using System;
+using System.IO;
+public class Test {
+        public static void Main () {
+                foreach (string f in Directory.GetDirectories (".", "*"))
+                        Console.WriteLine (f);
+} }
+Actual Results:
+(In the directory that contains no subdirectories.)
+Expected Results:
+(empty list)
+Additional Information:
+It does not happen when you run it on Linux.
+Jackson said that he had no problem when he tried it with his mono/corlib
+before beta1 version. Maybe it happens to occur after removal of managed
+wildcard in Directory.cs.