Title: Get-Item with a drive's root dir stringifies incorrectly · Issue #10956 · PowerShell/PowerShell · GitHub
Open Graph Title: Get-Item with a drive's root dir stringifies incorrectly · Issue #10956 · PowerShell/PowerShell
X Title: Get-Item with a drive's root dir stringifies incorrectly · Issue #10956 · PowerShell/PowerShell
Description: This is a regression from Windows PowerShell. When accessing a drive's root directory, an extra path separator is appended on stringification. Steps to reproduce $root = ('/', 'C:\')[$env:OS -eq 'Windows_NT'] Push-Location ('/', 'C:\')[$...
Open Graph Description: This is a regression from Windows PowerShell. When accessing a drive's root directory, an extra path separator is appended on stringification. Steps to reproduce $root = ('/', 'C:\')[$env:OS -eq 'W...
X Description: This is a regression from Windows PowerShell. When accessing a drive's root directory, an extra path separator is appended on stringification. Steps to reproduce $root = ('/', 'C:\&...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/10956
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Get-Item with a drive's root dir stringifies incorrectly","articleBody":"This is a regression from Windows PowerShell.\r\n\r\nWhen accessing a drive's root directory, an extra path separator is appended on stringification.\r\n\r\n# Steps to reproduce\r\n\r\n```powershell\r\n$root = ('/', 'C:\\')[$env:OS -eq 'Windows_NT']\r\nPush-Location ('/', 'C:\\')[$env:OS -eq 'Windows_NT']\r\n\r\n(Get-Item /).ToString() | Should -Be $root\r\n(Get-Item .).ToString() | Should -Be $root\r\n\r\nPop-Location \r\n```\r\n\r\n# Expected behavior\r\n\r\nThe tests should pass.\r\n\r\n# Actual behavior\r\n\r\nThe tests fails; e.g., on Windows:\r\n\r\n```none\r\nExpected: 'C:\\'\r\nBut was: 'C:\\\\'\r\n```\r\n\r\n# Environment data\r\n\r\n```none\r\nPowerShell Core 7.0.0-preview.5\r\n```\r\n","author":{"url":"https://github.com/mklement0","@type":"Person","name":"mklement0"},"datePublished":"2019-10-31T17:31:49Z","url":"https://github.com/PowerShell/PowerShell/issues/10956"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ccc758e2-cacf-82d2-a169-15776e18c91b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BE16:A00C1:1E0A75:289ADE:6AFD44E0 |
| html-safe-nonce | 429e09d1876d9ca32dbfa77164a825a97d0e0a55c2e241241a1a501bdff73ab4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRTE2OkEwMEMxOjFFMEE3NToyODlBREU6NkFGRDQ0RTAiLCJ2aXNpdG9yX2lkIjoiNDI0NjQ1Mzk2Mjg1NDQ1MDQwMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 35df010677993c53cab41ad781e92098de392cb979022fbe72ab285e64821844 |
| hovercard-subject-tag | issue:515616939 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/10956/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a4c54407d967066f8edff00555e92864693efaaf7439b0a711b1af31209c5b51/PowerShell/PowerShell/issues/10956 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a4c54407d967066f8edff00555e92864693efaaf7439b0a711b1af31209c5b51/PowerShell/PowerShell/issues/10956 |
| og:image:alt | This is a regression from Windows PowerShell. When accessing a drive's root directory, an extra path separator is appended on stringification. Steps to reproduce $root = ('/', 'C:\')[$env:OS -eq 'W... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mklement0 |
| hostname | github.com |
| expected-hostname | github.com |
| None | bdbacc25b921224ff0befcb9e629560a1255be51aec9991d6e3f95b5e9151474 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 556dd37bb0aceffb25724e151b5d858b3265b40b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width