[Mono-bugs] [Bug 58875][Wis] New - DirectoryInfo.GetFile(string mask) incorrectly throwing exception

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 23 May 2004 12:59:35 -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 ddmk@r66.ru.

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

--- shadow/58875	2004-05-23 12:59:35.000000000 -0400
+++ shadow/58875.tmp.24355	2004-05-23 12:59:35.000000000 -0400
@@ -0,0 +1,76 @@
+Bug#: 58875
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: Windows 2003
+Status: NEW   
+Resolution: 
+Severity: 001 One hour
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: ddmk@r66.ru               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: DirectoryInfo.GetFile(string mask) incorrectly throwing exception 
+
+Description of Problem:
+
+DirectoryInfo.GetFile(string mask);
+incorectly throwing exception 
+it throws exception when path is exist but no any files complies mask
+
+sample :
+using System;
+using System.IO;
+
+class Test 
+{	
+	static void Main(string[] args)
+	{ 			
+			DirectoryInfo dir=new DirectoryInfo(".");
+			Console.WriteLine("searching at "+dir.FullName);
+			FileInfo[] fi = dir.GetFiles("*.none");
+			foreach (FileInfo fiTemp in fi)
+				Console.WriteLine(fiTemp.FullName);
+                        Console.WriteLine("OK");
+        }
+}
+
+
+Actual Results:
+>mono 3.exe
+searching at C:\
+
+Unhandled Exception: System.IO.DirectoryNotFoundException: Could not find 
+a part of the path "C:\" in <0x002bf> 
+System.IO.Directory:GetFileSystemEntries 
+(string,string,System.IO.FileAttributes,System.IO.FileAttributes)
+in <0x00018> System.IO.Directory:GetFiles (string,string)
+in <0x00016> System.IO.DirectoryInfo:GetFiles (string)
+in <0x0004f> (wrapper remoting-invoke-with-check) 
+System.IO.DirectoryInfo:GetFiles (string)
+in <0x0006f> Test:Main (string[])
+
+
+Expected Results:
+searching at C:\
+OK
+
+
+How often does this happen? 
+everytime
+
+
+Additional Information:
+If in directory present any files that complies  mask it works correctly
+but if present none it fails.
+
+
+I download beta1-2 for win32 but before compying all dlls from 
+Mono\lib\mono\1.0 to Mono\lib 
+many programs failes with error cannot find assembly System.dll
+after copying libraries Windows.Forms still not work
+and some errors with System.IO which you can see here.