[Mono-bugs] [Bug 56938][Nor] New - Directory.GetFileSystemEntries and file name case

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 13 Apr 2004 11:50:48 -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 gonzalo@ximian.com.

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

--- shadow/56938	2004-04-13 11:50:48.000000000 -0400
+++ shadow/56938.tmp.31188	2004-04-13 11:50:48.000000000 -0400
@@ -0,0 +1,60 @@
+Bug#: 56938
+Product: Mono: Class Libraries
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: gonzalo@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Directory.GetFileSystemEntries and file name case
+
+Run this test (thanks Atsushi!) under windows changing the realpath and
+create one of gon.cs or GON.CS:
+-----------------
+using System;
+using System.IO;
+
+public class Test
+{
+        public static void Main ()
+        {
+                string lower = "gon.cs";
+                string upper = "GON.CS";
+                string realpath = "c:/cygwin/home/ginga/tests/";
+                Console.WriteLine (File.Exists (lower));
+                Console.WriteLine (File.Exists (upper));
+                Console.WriteLine (Directory.GetFiles (realpath,
+upper).Length);
+                Console.WriteLine (Directory.GetFiles (realpath,
+lower).Length);
+        }
+}
+----------
+
+Actual results:
+True
+True
+0
+1
+
+Expected results:
+True
+True
+1
+1
+
+Additional information:
+Directory.GetFileSystemEntries knows nothing about the underlying
+filesystem case (in)sensitiveness and it always compares in a case
+sensitive way.
+
+This makes WebConfigurationSettings fail on windows.
+Atsushi already commited a workaround for that.