{"action":"opened","issue":{"url":"https://api.github.com/repos/dotnet/coreclr/issues/29","labels_url":"https://api.github.com/repos/dotnet/coreclr/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/29/comments","events_url":"https://api.github.com/repos/dotnet/coreclr/issues/29/events","html_url":"https://github.com/dotnet/coreclr/issues/29","id":56429582,"number":29,"title":"DirectoryInfo.Exists returns incorrect results when it is cast from FileSystemInfo","user":{"login":"troydai","id":1329240,"avatar_url":"https://avatars.githubusercontent.com/u/1329240?v=3","gravatar_id":"","url":"https://api.github.com/users/troydai","html_url":"https://github.com/troydai","followers_url":"https://api.github.com/users/troydai/followers","following_url":"https://api.github.com/users/troydai/following{/other_user}","gists_url":"https://api.github.com/users/troydai/gists{/gist_id}","starred_url":"https://api.github.com/users/troydai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/troydai/subscriptions","organizations_url":"https://api.github.com/users/troydai/orgs","repos_url":"https://api.github.com/users/troydai/repos","events_url":"https://api.github.com/users/troydai/events{/privacy}","received_events_url":"https://api.github.com/users/troydai/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-03T20:08:16Z","updated_at":"2015-02-03T20:08:16Z","closed_at":null,"body":"When test the same directory, `DirectoryInfo` and `Directory.Exist(...)` gives different answers. The bug is repo on `System.IO.FileSystem 4.0.0-beta-22530`.\r\n\r\nThe issue can't be reproduced on CLR.\r\n\r\nRepo code:\r\n```\r\nvar root = Path.GetTempFileName();\r\nFile.Delete(root);\r\nDirectory.CreateDirectory(root);\r\n\r\nvar testDir = new DirectoryInfo(root);\r\nvar betaDir = Path.Combine(root, \"beta\");\r\n\r\nDirectory.CreateDirectory(betaDir);\r\n\r\nvar beta = testDir.EnumerateFileSystemInfos(\"beta\", SearchOption.TopDirectoryOnly).First() as DirectoryInfo;\r\nConsole.WriteLine(\"Test {0} using DirectoryInfo: {1}\", beta.FullName, beta.Exists);\r\nConsole.WriteLine(\"Test {0} using Directory.Exist: {1}\", betaDir, Directory.Exists(betaDir));\r\n```"}}