Title: .LinkType and .Target properties of System.IO.DirectoryInfo instances do not correctly reflect system-defined junctions · Issue #7127 · PowerShell/PowerShell · GitHub
Open Graph Title: .LinkType and .Target properties of System.IO.DirectoryInfo instances do not correctly reflect system-defined junctions · Issue #7127 · PowerShell/PowerShell
X Title: .LinkType and .Target properties of System.IO.DirectoryInfo instances do not correctly reflect system-defined junctions · Issue #7127 · PowerShell/PowerShell
Description: Windows Vista defined (hidden) junctions (essentially, symbolic links to directories) to redirect legacy folder paths to their modern paths; e.g, "$HOME/Cookies", "$HOME/My Documents". The .LinkType property of such paths, as returned by...
Open Graph Description: Windows Vista defined (hidden) junctions (essentially, symbolic links to directories) to redirect legacy folder paths to their modern paths; e.g, "$HOME/Cookies", "$HOME/My Documents". The .LinkTyp...
X Description: Windows Vista defined (hidden) junctions (essentially, symbolic links to directories) to redirect legacy folder paths to their modern paths; e.g, "$HOME/Cookies", "$HOME/My Documents...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/7127
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":".LinkType and .Target properties of System.IO.DirectoryInfo instances do not correctly reflect system-defined junctions","articleBody":"Windows Vista defined (hidden) junctions (essentially, symbolic links to directories) to redirect legacy folder paths to their modern paths; e.g, `\"$HOME/Cookies\"`, `\"$HOME/My Documents\"`.\r\n\r\nThe `.LinkType` property of such paths, as returned by `Get-Item` / `Get-ChildItem` should contain string `'Junction'`, but it is currently `$null`.\r\n\r\nSimilarly, the `.Target` property (the link/junctions's target path) unexpectedly contains `$null`.\r\n\r\nNote that these junctions also have the `Hidden` and `System` attributes set (in addition to `ReparsePoint`).\r\n\r\nHowever, even manually recreating a junction with all these attributes set does not reproduce the problem.\r\n\r\nSteps to reproduce\r\n-------\r\n\r\n```powershell\r\nGet-Item -Force $HOME/Cookies | Select Mode, LinkType\r\n```\r\n\r\nExpected behavior\r\n-----------------\r\n\r\n```none\r\nMode LinkType\r\n---- --------\r\nd--hsl Junction\r\n```\r\n\r\nActual behavior\r\n---------------\r\n\r\n```none\r\nMode LinkType\r\n---- --------\r\nd--hsl \r\n```\r\n\r\nNote how the `LinkType` value is missing.\r\n\r\nYou can verify that the target path is a junction as follows:\r\n`cmd /c dir /aL $HOME | sls Cookies`\r\n\r\nEnvironment data\r\n----------------\r\n\r\n```powershell\r\nPowerShell Core v6.1.0-preview.3 on Microsoft Windows 10 Pro (64-bit; Version 1709, OS Build: \r\n```\r\n","author":{"url":"https://github.com/mklement0","@type":"Person","name":"mklement0"},"datePublished":"2018-06-21T02:15:55Z","url":"https://github.com/PowerShell/PowerShell/issues/7127"}
| 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:99fefeed-8043-3e2a-c4f0-9c9b6570bbf5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 980C:109943:16E4DC:1F6521:6AFD4E5C |
| html-safe-nonce | 7e420b9c3fac234ae4b8e63d9475d45a273c66f7f49ed1a6d56abceee7c903f7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODBDOjEwOTk0MzoxNkU0REM6MUY2NTIxOjZBRkQ0RTVDIiwidmlzaXRvcl9pZCI6IjM2NjIxNDYzMTM4OTExNzE5MzIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 520ab01ee7efd3b876dc5a392b404b252c682acc055a2900941edce6dab291ee |
| hovercard-subject-tag | issue:334312641 |
| 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/7127/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2d17798353533651b1091e09f7afa844f6410ef9e3ef3cafed886f79bee21f19/PowerShell/PowerShell/issues/7127 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2d17798353533651b1091e09f7afa844f6410ef9e3ef3cafed886f79bee21f19/PowerShell/PowerShell/issues/7127 |
| og:image:alt | Windows Vista defined (hidden) junctions (essentially, symbolic links to directories) to redirect legacy folder paths to their modern paths; e.g, "$HOME/Cookies", "$HOME/My Documents". The .LinkTyp... |
| 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 | 66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e |
| 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 | b6f01f7cb9f35f8c09949773241a3d49dd04b340 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width