{"action":"created","issue":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/7047","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/7047/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/7047/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/7047/events","html_url":"https://github.com/PowerShell/PowerShell/issues/7047","id":331670641,"node_id":"MDU6SXNzdWUzMzE2NzA2NDE=","number":7047,"title":"Creating a folder in the root of the drive throws an error.","user":{"login":"sethvs","id":26186700,"node_id":"MDQ6VXNlcjI2MTg2NzAw","avatar_url":"https://avatars3.githubusercontent.com/u/26186700?v=4","gravatar_id":"","url":"https://api.github.com/users/sethvs","html_url":"https://github.com/sethvs","followers_url":"https://api.github.com/users/sethvs/followers","following_url":"https://api.github.com/users/sethvs/following{/other_user}","gists_url":"https://api.github.com/users/sethvs/gists{/gist_id}","starred_url":"https://api.github.com/users/sethvs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethvs/subscriptions","organizations_url":"https://api.github.com/users/sethvs/orgs","repos_url":"https://api.github.com/users/sethvs/repos","events_url":"https://api.github.com/users/sethvs/events{/privacy}","received_events_url":"https://api.github.com/users/sethvs/received_events","type":"User","site_admin":false},"labels":[{"id":552752833,"node_id":"MDU6TGFiZWw1NTI3NTI4MzM=","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Area-Providers","name":"Area-Providers","color":"5319e7","default":false},{"id":423526741,"node_id":"MDU6TGFiZWw0MjM1MjY3NDE=","url":"https://api.github.com/repos/PowerShell/PowerShell/labels/Issue-Discussion","name":"Issue-Discussion","color":"fc2929","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-06-12T16:51:31Z","updated_at":"2018-06-19T01:38:38Z","closed_at":"2018-06-19T01:38:38Z","author_association":"CONTRIBUTOR","body":"<!--\r\n\r\nFor Windows PowerShell 5.1 issues, suggestions, or feature requests please use the following link instead:\r\n- Windows PowerShell [UserVoice](https://windowsserver.uservoice.com/forums/301869-powershell)\r\n\r\nIf it is a bug report:\r\n- make sure you are able to repro it on the latest released version. \r\nYou can install the latest version from https://github.com/PowerShell/PowerShell/releases\r\n- Search the existing issues.\r\n- Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\r\n- Refer to the [known issues](https://docs.microsoft.com/powershell/scripting/whats-new/known-issues-ps6?view=powershell-6).\r\n- Fill out the following repro template:\r\n\r\nIf it's not a bug, please remove the template and elaborate the issue in your own words.\r\n-->\r\n\r\nSteps to reproduce\r\n------------------\r\n\r\n```powershell\r\nNew-Item c:\\test -ItemType Directory\r\n```\r\n\r\nExpected behavior\r\n-----------------\r\n```none\r\nCreate directory\r\n```\r\n\r\nActual behavior\r\n---------------\r\n\r\n```none\r\nNew-Item : The directory specified, 'test', is not a subdirectory of 'C:\\'.\r\nParameter name: path\r\nAt line:1 char:1\r\n+ New-Item c:\\test -ItemType Directory\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n+ CategoryInfo          : InvalidArgument: (C:\\test:String) [New-Item], ArgumentException\r\n+ FullyQualifiedErrorId : CreateDirectoryArgumentError,Microsoft.PowerShell.Commands.NewItemCommand\r\n```\r\n\r\nEnvironment data\r\n----------------\r\n\r\n<!-- provide the output of $PSVersionTable -->\r\n\r\n```powershell\r\n> $PSVersionTable\r\nName                           Value\r\n----                           -----\r\nPSVersion                      6.1.0-preview.705\r\nPSEdition                      Core\r\nGitCommitId                    v6.1.0-preview.705\r\nOS                             Microsoft Windows 10.0.17134\r\nPlatform                       Win32NT\r\nPSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}\r\nPSRemotingProtocolVersion      2.3\r\nSerializationVersion           1.1.0.1\r\nWSManStackVersion              3.0\r\n\r\n```\r\n\r\nAlso, when you use method `CreateSubdirectory` of the DirectoryInfo object, the error still throws:\r\n\r\n```powershell\r\n(Get-Item c:\\).CreateSubdirectory('test')\r\n```\r\n\r\n```\r\nException calling \"CreateSubdirectory\" with \"1\" argument(s): \"The directory specified, 'test', is not a subdirectory of 'C:\\'.\r\nParameter name: path\"\r\nAt line:1 char:1\r\n+ (Get-Item c:\\).CreateSubdirectory('test')\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n+ CategoryInfo          : NotSpecified: (:) [], MethodInvocationException\r\n+ FullyQualifiedErrorId : ArgumentException\r\n```\r\n\r\nIs it a .NET Core bug?\r\n"},"comment":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/comments/398246956","html_url":"https://github.com/PowerShell/PowerShell/issues/7047#issuecomment-398246956","issue_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/7047","id":398246956,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODI0Njk1Ng==","user":{"login":"SteveL-MSFT","id":11859881,"node_id":"MDQ6VXNlcjExODU5ODgx","avatar_url":"https://avatars1.githubusercontent.com/u/11859881?v=4","gravatar_id":"","url":"https://api.github.com/users/SteveL-MSFT","html_url":"https://github.com/SteveL-MSFT","followers_url":"https://api.github.com/users/SteveL-MSFT/followers","following_url":"https://api.github.com/users/SteveL-MSFT/following{/other_user}","gists_url":"https://api.github.com/users/SteveL-MSFT/gists{/gist_id}","starred_url":"https://api.github.com/users/SteveL-MSFT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SteveL-MSFT/subscriptions","organizations_url":"https://api.github.com/users/SteveL-MSFT/orgs","repos_url":"https://api.github.com/users/SteveL-MSFT/repos","events_url":"https://api.github.com/users/SteveL-MSFT/events{/privacy}","received_events_url":"https://api.github.com/users/SteveL-MSFT/received_events","type":"User","site_admin":false},"created_at":"2018-06-19T01:38:38Z","updated_at":"2018-06-19T01:38:38Z","author_association":"MEMBER","body":"CreateSubDirectory() has a [regression](https://github.com/dotnet/corefx/issues/30283) in dotnetcore 2.1\r\n\r\nWe made a [fix](https://github.com/PowerShell/PowerShell/pull/7060/commits/0d67d4dc3a38a2030b26a0a81ae485fa2c243b49) during Preview3 release to use CreateDirectory() instead"}}
{"actor":{"display_login":"SteveL-MSFT"}}