[Mono-bugs] [Bug 82212][Nor] New - Directory.GetFiles with *.* pattern does not return files without extension
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Sat Jul 28 03:06:06 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 gert.driesen at pandora.be.
http://bugzilla.ximian.com/show_bug.cgi?id=82212
--- shadow/82212 2007-07-28 03:06:06.000000000 -0400
+++ shadow/82212.tmp.30178 2007-07-28 03:06:06.000000000 -0400
@@ -0,0 +1,60 @@
+Bug#: 82212
+Product: Mono: Runtime
+Version: 1.2
+OS: GNU/Linux [Other]
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: io-layer
+AssignedTo: dick at ximian.com
+ReportedBy: gert.driesen at pandora.be
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Directory.GetFiles with *.* pattern does not return files without extension
+
+On Linux, Directory.GetFiles does not return files without extension when
+using the *.* pattern. This pattern is commonly used in Windows
+applications (instead of *).
+
+On Mono/Windows it works fine.
+
+To reproduce, compile and run the following code snippet:
+
+using System;
+using System.IO;
+
+class Program
+{
+ static void Main ()
+ {
+ string tempDir = Path.Combine (AppDomain.CurrentDomain.BaseDirectory,
+ "temp");
+ if (Directory.Exists (tempDir))
+ Directory.Delete (tempDir, true);
+ Directory.CreateDirectory (tempDir);
+ FileStream fs = File.Create (Path.Combine (tempDir, "tempFile"));
+ fs.Close ();
+
+ string [] files1 = Directory.GetFiles (tempDir, "*.*");
+ foreach (string f in files1)
+ Console.WriteLine ("A: " + f);
+
+ DirectoryInfo dir = new DirectoryInfo (tempDir);
+ FileInfo [] files2 = dir.GetFiles ("*.*");
+ foreach (FileInfo f in files2)
+ Console.WriteLine ("B: " + f.FullName);
+ }
+}
+
+Expected result:
+
+A: <some path>/tempFile
+B: <some path>/tempFile
+
+Actual result:
+
+Nothing is output.
More information about the mono-bugs
mailing list