[Mono-bugs] [Bug 26133] New - Directory.GetFiles fails with an IOException on empty folders

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
11 Jun 2002 22:35:59 -0000


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 girish_bharadwaj@hotmail.com.

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

--- shadow/26133	Tue Jun 11 18:35:59 2002
+++ shadow/26133.tmp.5044	Tue Jun 11 18:35:59 2002
@@ -0,0 +1,50 @@
+Bug#: 26133
+Product: Mono/Runtime
+Version: unspecified
+OS: Mandrake 8.1
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: girish_bharadwaj@hotmail.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Directory.GetFiles fails with an IOException on empty folders
+
+Please fill in this template when reporting a bug, unless you know what 
+you are doing.
+Description of Problem: 
+Directory.GetFiles() call fails with an IOException on empty folders.
+
+Steps to reproduce the problem:
+1. Create a file dirtest.cs with following code
+public static void Main(String[] args) {
+  string[] arrFiles = Directory.GetFiles(args[0]);
+}
+Compile it.
+2. Create an empty folder anywhere.
+3. Call dirtest.exe with the created folder.
+
+Actual Results:
+(process:18664): ** WARNING **: unhandled exception 
+System.IO.IOException: "Win32 IO returned ERROR_NO_MORE_FILES"
+in <0x00152> System.IO.Directory:GetFileSystemEntries 
+(string,string,System.IO.FileAttributes,System.IO.FileAttributes)
+in <0x0007d> .DirTest:Main (string[])
+
+
+
+
+Expected Results:
+Nothing. It should return a empty string [].
+
+How often does this happen? 
+Everytime.
+
+Additional Information:
+Tested only on linux.