[Mono-bugs] [Bug 58583][Wis] New - Directory.GetFileSystemEntries() should not raise an error when no matched file found
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sun, 16 May 2004 17:12:30 -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.
http://bugzilla.ximian.com/show_bug.cgi?id=58583
--- shadow/58583 2004-05-16 17:12:30.000000000 -0400
+++ shadow/58583.tmp.32375 2004-05-16 17:12:30.000000000 -0400
@@ -0,0 +1,43 @@
+Bug#: 58583
+Product: Mono: Class Libraries
+Version: unspecified
+OS:
+OS Details: WinXP
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: atsushi@ximian.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Directory.GetFileSystemEntries() should not raise an error when no matched file found
+
+GetFileSystemEntries() rejects empty list on Windows.
+
+using System;
+using System.IO;
+
+public class Test {
+ public static void Main () {
+ foreach (string f in Directory.GetFileSystemEntries (".", "notexist"))
+ System.Console.WriteLine (f);
+ }
+}
+
+Actual Results:
+Unhandled Exception: System.IO.DirectoryNotFoundException: Could not find a
+part of the path "."
+in <0x002d5> System.IO.Directory:GetFileSystemEntries
+(string,string,System.IO.FileAttributes,System.IO.FileAttributes)
+in <0x00018> System.IO.Directory:GetFileSystemEntries (string,string)
+in <0x00024> Test:Main ()
+
+Expected Results:
+no error.
+
+How often does this happen?
+When you run it on windows. On Linux it didn't happen.