Bug 28875 - System.IO.Directory.EnumerateFiles on Mac is case-sensitive
Summary: System.IO.Directory.EnumerateFiles on Mac is case-sensitive
Status: NEW
Alias: None
Product: Runtime
Classification: Mono
Component: io-layer (show other bugs)
Version: 3.12.0
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-04-07 22:17 UTC by xamarin
Modified: 2015-04-15 07:50 UTC (History)
3 users (show)

See Also:
Is this bug a regression?: ---
Last known good build:


Description xamarin 2015-04-07 22:17:32 UTC
It appears that on Mac, Directory.EnumerateFiles, when called with a search pattern, behaves in a case-sensitive manner. Deep in the bowels of the Mono sources on github, it seems this may be controlled via a #define of IS_PORTABILITY_CASE and others.

As a workaround, list everything w/o a search pattern and filter yourself, if you care to have a case insensitive search occur.
Comment 1 xamarin 2015-04-07 22:18:14 UTC
Seems this has also been mentioned here:

Comment 2 Marek Safar 2015-04-15 07:50:09 UTC
It looks like IS_PORTABILITY_CASE is not initialised correctly. We'll probably have to read some HFS+ as it can be both case sensitive and insensitive.

The easiest workaround for you is to set MONO_IOMAP=case

Note You need to log in before you can comment on or make changes to this bug.