[Mono-dev] DirectoryInfo.GetDirectories Bug

Jonathan Pobst monkey at jpobst.com
Fri May 23 16:05:31 EDT 2008


Nevermind, this function is dependent on the underlying filesystem on 
Windows.  NTFS and CDFS are alphabetic case-insensitive as listed, 
however on FAT, it is the order in which the files were created.

I will do the sort in winforms.

Jonathan


Jonathan Pobst wrote:
> Hey guys, I am working on bug #393931.  Basically the bug is that 
> winforms' open file dialog sorts directories case sensitive instead of 
> insensitive, so directories like "Mono" and "Projects" come before "bin".
> 
> The code we use is this:
> 
> DirectoryInfo di = new DirectoryInfo (Environment.CurrentDirectory);
> DirectoryInfo[] dirs = di.GetDirectories ();
> 
> foreach (DirectoryInfo d in dirs)
> 	Console.WriteLine (d.Name);
> 
> On Windows, this would return:
> A, b, C
> 
> On Linux, this would return:
> A, C, b
> 
> I realize the Linux filesystem is different, but my question is do we 
> want to replicate the Windows behavior on Linux or not?  If not, I can 
> work around it in winforms, but I thought this might be something we 
> wanted to emulate MS on.  (MONO_IOMAP has no effect either.)
> 
> Thanks!
> Jonathan
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 
> 



More information about the Mono-devel-list mailing list