Bug 3602 - System.IO.Directory.EnumerateFiles skips directories with names not having a dot in them??
Summary: System.IO.Directory.EnumerateFiles skips directories with names not having a ...
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: 2.10.x
Hardware: PC Linux
: Normal major
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2012-02-22 20:32 UTC by Bill Fraser
Modified: 2016-04-16 08:29 UTC (History)
5 users (show)

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

Example showing the bug (4.79 KB, application/x-zip-compressed)
2013-05-03 06:32 UTC, Jesper Kamstrup Linnet

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Bill Fraser 2012-02-22 20:32:47 UTC
Mono 2.10.8, Arch Linux

foreach (var file in Directory.EnumerateFiles(Directory.GetCurrentDirectory(), "*", SearchOption.AllDirectories)) {

% find .

(all files are mode 0644 and all dirs are mode 0755, owner and group are myself)

% mono ~/enumFiles.exe

It didn't descend into any directory lacking a dot in the name.
Running the same program in .NET prints all files.
Running in Mono and switching to GetFiles() prints all the files.
Comment 1 Marek Safar 2012-06-15 10:07:16 UTC
I cannot reproduce the issue with mono master. Please provide self contained test case
Comment 2 Jesper Kamstrup Linnet 2013-05-03 06:32:11 UTC
Created attachment 3911 [details]
Example showing the bug

Example project with directory structure reproducing the bug.
Comment 3 Jett Rink 2013-05-11 12:42:51 UTC
I am seeing the same behavior. I am targeting the .NET 4.0, and the versions I am using follow:

	Mono (Debian (64-bit)
	GTK 2.24.17
	GTK# (
Build information:
	Git revision: 7bf6ac0ca43c1b12703176ad9933c3484c05c84c-dirty
	Build date: 2012-08-24 05:44:11+0000
Operating System:
	Linux home 3.8.0-19-generic #30-Ubuntu SMP Wed May 1 16:35:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Comment 4 Marek Safar 2016-04-16 08:29:15 UTC
Works as expected with Mono 4.4