{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/FileSystem/issues/232","repository_url":"https://api.github.com/repos/aspnet/FileSystem","labels_url":"https://api.github.com/repos/aspnet/FileSystem/issues/232/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/FileSystem/issues/232/comments","events_url":"https://api.github.com/repos/aspnet/FileSystem/issues/232/events","html_url":"https://github.com/aspnet/FileSystem/issues/232","id":177315044,"number":232,"title":"PhysicalFileProvider can't find \".env\" file","user":{"login":"HaoK","id":6537861,"avatar_url":"https://avatars.githubusercontent.com/u/6537861?v=3","gravatar_id":"","url":"https://api.github.com/users/HaoK","html_url":"https://github.com/HaoK","followers_url":"https://api.github.com/users/HaoK/followers","following_url":"https://api.github.com/users/HaoK/following{/other_user}","gists_url":"https://api.github.com/users/HaoK/gists{/gist_id}","starred_url":"https://api.github.com/users/HaoK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HaoK/subscriptions","organizations_url":"https://api.github.com/users/HaoK/orgs","repos_url":"https://api.github.com/users/HaoK/repos","events_url":"https://api.github.com/users/HaoK/events{/privacy}","received_events_url":"https://api.github.com/users/HaoK/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/aspnet/FileSystem/milestones/17","html_url":"https://github.com/aspnet/FileSystem/milestones/2.0.0","labels_url":"https://api.github.com/repos/aspnet/FileSystem/milestones/17/labels","id":2009644,"number":17,"title":"2.0.0","description":null,"creator":{"login":"muratg","id":1808428,"avatar_url":"https://avatars.githubusercontent.com/u/1808428?v=3","gravatar_id":"","url":"https://api.github.com/users/muratg","html_url":"https://github.com/muratg","followers_url":"https://api.github.com/users/muratg/followers","following_url":"https://api.github.com/users/muratg/following{/other_user}","gists_url":"https://api.github.com/users/muratg/gists{/gist_id}","starred_url":"https://api.github.com/users/muratg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muratg/subscriptions","organizations_url":"https://api.github.com/users/muratg/orgs","repos_url":"https://api.github.com/users/muratg/repos","events_url":"https://api.github.com/users/muratg/events{/privacy}","received_events_url":"https://api.github.com/users/muratg/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2016-09-16T17:11:33Z","updated_at":"2016-09-19T19:46:51Z","due_on":null,"closed_at":null},"comments":19,"created_at":"2016-09-15T23:30:52Z","updated_at":"2016-09-19T21:09:45Z","closed_at":null,"body":"Maybe files that start with .causing issues?\r\n\r\nFound by https://github.com/aspnet/Configuration/issues/505\r\n\r\nSimple repro:\r\n```\r\n        [Fact]\r\n        public void CanAddDotEnvFile()\r\n        {\r\n#if NET451\r\n            _basePath = AppDomain.CurrentDomain.GetData(\"APP_CONTEXT_BASE_DIRECTORY\") as string ??\r\n                AppDomain.CurrentDomain.BaseDirectory ??\r\n                string.Empty;\r\n#else\r\n            _basePath = AppContext.BaseDirectory ?? string.Empty;\r\n#endif\r\n\r\n            File.WriteAllText(Path.Combine(_basePath, \"works.env\"), \"foo\");\r\n            Assert.True(File.Exists(Path.Combine(_basePath, \"works.env\")));\r\n            Assert.True(new PhysicalFileProvider(_basePath).GetFileInfo(\"works.env\").Exists);\r\n\r\n            File.WriteAllText(Path.Combine(_basePath, \".env\"), \"foo\");\r\n            Assert.True(File.Exists(Path.Combine(_basePath, \".env\")));\r\n            Assert.True(new PhysicalFileProvider(_basePath).GetFileInfo(\".env\").Exists); // Failes\r\n        }\r\n```"},"comment":{"url":"https://api.github.com/repos/aspnet/FileSystem/issues/comments/248127612","html_url":"https://github.com/aspnet/FileSystem/issues/232#issuecomment-248127612","issue_url":"https://api.github.com/repos/aspnet/FileSystem/issues/232","id":248127612,"user":{"login":"Tratcher","id":1821173,"avatar_url":"https://avatars.githubusercontent.com/u/1821173?v=3","gravatar_id":"","url":"https://api.github.com/users/Tratcher","html_url":"https://github.com/Tratcher","followers_url":"https://api.github.com/users/Tratcher/followers","following_url":"https://api.github.com/users/Tratcher/following{/other_user}","gists_url":"https://api.github.com/users/Tratcher/gists{/gist_id}","starred_url":"https://api.github.com/users/Tratcher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tratcher/subscriptions","organizations_url":"https://api.github.com/users/Tratcher/orgs","repos_url":"https://api.github.com/users/Tratcher/repos","events_url":"https://api.github.com/users/Tratcher/events{/privacy}","received_events_url":"https://api.github.com/users/Tratcher/received_events","type":"User","site_admin":false},"created_at":"2016-09-19T21:09:45Z","updated_at":"2016-09-19T21:09:45Z","body":"IFileProvider and PhysicalFileProvider were originally built for StaticFiles and most of the file access restrictions were implemented inside PhysicalFileProvider. About the only thing StaticFiles does itself is check the file extension to look up the mime-type.\r\n\r\nWhen PhysicalFileProvider started getting used in a more general context non of the design decisions were re-evaluated."}}
{"actor":{"display_login":"Tratcher"}}