Try to fix Directory.EnumerateFiles for hidden files

This commit is contained in:
Marek Safar committed 2012-06-15 16:04:08 +01:00
1 parent 1fd51d3e03
commit e09e64bead
1 file changed
+6
+6
View File
@@ -547,6 +547,12 @@ namespace System.IO
throw MonoIO.GetException (Path.GetDirectoryName (Path.Combine (path, searchPattern)), (MonoIOError) error);
try {
//
// Convert any file specific flag to FileAttributes.Normal which is used as include files flag
//
if (((rattr & FileAttributes.Directory) == 0) && rattr != 0)
rattr |= FileAttributes.Normal;
bool first = true;
if (((rattr & FileAttributes.ReparsePoint) == 0) && ((rattr & kind) != 0))
yield return s;