René's URL Explorer Experiment


Title: Should we do path normalizations on Unix well as on Windows? · Issue #6833 · PowerShell/PowerShell · GitHub

Open Graph Title: Should we do path normalizations on Unix well as on Windows? · Issue #6833 · PowerShell/PowerShell

X Title: Should we do path normalizations on Unix well as on Windows? · Issue #6833 · PowerShell/PowerShell

Description: Currently we do agressively path normalizations by replacing '/' with '\' on Windows and '\' with '/' on Unix. NormalizePath() It is acceptable for Windows but has side affects on Unix because '\' is valid char in directory/file names. ....

Open Graph Description: Currently we do agressively path normalizations by replacing '/' with '\' on Windows and '\' with '/' on Unix. NormalizePath() It is acceptable for Windows but has side affects on Unix because '\' ...

X Description: Currently we do agressively path normalizations by replacing '/' with '\' on Windows and '\' with '/' on Unix. NormalizePath() It is acceptable for Windows but has s...

Opengraph URL: https://github.com/PowerShell/PowerShell/issues/6833

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Should we do path normalizations on Unix well as on Windows?","articleBody":"Currently we do agressively path normalizations by replacing '/' with '\\\\' on Windows and '\\\\' with '/' on Unix. [NormalizePath()](https://github.com/PowerShell/PowerShell/blob/master/src/System.Management.Automation/namespaces/FileSystemProvider.cs#L97)\r\nIt is acceptable for Windows but has side affects on Unix because '\\\\' is valid char in directory/file names.\r\n\r\n.Net Core do the same for Windows but don't  the normalization for Unix.\r\n[IsPathRooted on Unix](https://github.com/dotnet/corefx/blob/3cfab0ce729f8f9c09db0da42e56bd8bae0090de/src/Common/src/CoreLib/System/IO/Path.Unix.cs#L114) ([IsDirectorySeparator](https://github.com/dotnet/corefx/blob/16f26ba855f5cc6d52a738e8bc3856c6f77cf761/src/Common/src/System/IO/PathInternal.Unix.cs#L19))\r\n[IsPathRooted on Windows](https://github.com/dotnet/corefx/blob/3cfab0ce729f8f9c09db0da42e56bd8bae0090de/src/Common/src/CoreLib/System/IO/Path.Windows.cs#L158) ([IsDirectorySeparator](https://github.com/dotnet/corefx/blob/16f26ba855f5cc6d52a738e8bc3856c6f77cf761/src/Common/src/System/IO/PathInternal.Windows.cs#L241))\r\n\r\n[NormalizeDirectorySeparators on Unix](https://github.com/dotnet/corefx/blob/3cfab0ce729f8f9c09db0da42e56bd8bae0090de/src/Common/src/CoreLib/System/IO/PathInternal.Unix.cs#L42)\r\n[NormalizeDirectorySeparators on Windows](https://github.com/dotnet/corefx/blob/3cfab0ce729f8f9c09db0da42e56bd8bae0090de/src/Common/src/CoreLib/System/IO/PathInternal.Windows.cs#L352)\r\n\r\nAs you see Unix takes into account only '/' and Windows both '\\\\' and '/'.\r\n\r\nShould we follow .Net Core in the path normalization?\r\n\r\nRelated issues:\r\n- Set-Location preserves case instead of matching filesystem on case-insensitive/preserving system  #5678\r\n- Location completion should be case-insensitive  #1273\r\n- Bug: can not handle \"/\" correctly when reading registry item #5536 \r\n- Replace string-compare-based test for copying to same file with more #3441\r\n- File mode in Linux should reflect Linux modes #1817\r\n\r\n- History #1115\r\n- On Unix, PowerShell will not find files with backslashes in their names #3666\r\n-  New-Item -ItemType SymbolicLink should support creating symlinks with relative paths #3500.\r\n\r\n\r\nSimple side affect repo on Unix below:\r\n\r\nSteps to reproduce\r\n------------------\r\n\r\n```powershell\r\nmkdir /\\\r\n\r\ncd \\\r\n$pwd\r\n```\r\n\r\nExpected behavior\r\n-----------------\r\n\r\n```none\r\n\\\r\n```\r\n\r\nActual behavior\r\n---------------\r\n\r\n```none\r\n/\r\n```\r\n","author":{"url":"https://github.com/iSazonov","@type":"Person","name":"iSazonov"},"datePublished":"2018-05-07T13:21:08Z","url":"https://github.com/PowerShell/PowerShell/issues/6833"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:1dec3793-9f52-1fcb-d17f-0b5da3e4b6ac
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC2EA:1C11C6:39544F:522DD9:6AFD6B11
html-safe-nonce7915def585252bdb1ecf077ab0a8a3f45cfc74ab50a51d8851044e1a51ca6ad8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMkVBOjFDMTFDNjozOTU0NEY6NTIyREQ5OjZBRkQ2QjExIiwidmlzaXRvcl9pZCI6IjQ2MjQ4ODU0NDI1NjU0NjY4OTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac25a6b2ead2b1daf73d7d1830b74640fe66a04b12a58624f547d63013ce2f5406
hovercard-subject-tagissue:320802238
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/6833/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ce4c94be2d96727537a96280ff6859ad1714dfc5a672559814919b1d1215ed93/PowerShell/PowerShell/issues/6833
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ce4c94be2d96727537a96280ff6859ad1714dfc5a672559814919b1d1215ed93/PowerShell/PowerShell/issues/6833
og:image:altCurrently we do agressively path normalizations by replacing '/' with '\' on Windows and '\' with '/' on Unix. NormalizePath() It is acceptable for Windows but has side affects on Unix because '\' ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameiSazonov
hostnamegithub.com
expected-hostnamegithub.com
None9985ca2e21b59673104d4d830d4afeb946c67f248f273ab2e824c31c8db46e4a
turbo-cache-controlno-preview
go-importgithub.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git
octolytics-dimension-user_id11524380
octolytics-dimension-user_loginPowerShell
octolytics-dimension-repository_id49609581
octolytics-dimension-repository_nwoPowerShell/PowerShell
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id49609581
octolytics-dimension-repository_network_root_nwoPowerShell/PowerShell
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release0db9e8d463c3f4540570e6ad3c501a06db9dc02a
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/PowerShell/PowerShell/issues/6833#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fissues%2F6833
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fissues%2F6833
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=PowerShell%2FPowerShell
Reloadhttps://github.com/PowerShell/PowerShell/issues/6833
Reloadhttps://github.com/PowerShell/PowerShell/issues/6833
Reloadhttps://github.com/PowerShell/PowerShell/issues/6833
PowerShellhttps://github.com/PowerShell
PowerShellhttps://github.com/PowerShell/PowerShell
Codehttps://github.com/PowerShell/PowerShell
Issues1.3k (1.3k)https://github.com/PowerShell/PowerShell/issues
Pull requests365 (365)https://github.com/PowerShell/PowerShell/pulls
Discussionshttps://github.com/PowerShell/PowerShell/discussions
Actionshttps://github.com/PowerShell/PowerShell/actions
Projectshttps://github.com/PowerShell/PowerShell/projects
Security and quality3 (3)https://github.com/PowerShell/PowerShell/security
Insightshttps://github.com/PowerShell/PowerShell/insights
https://github.com/PowerShell/PowerShell
New issuehttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/6833
New issuehttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/6833
Should we do path normalizations on Unix well as on Windows?https://github.com/PowerShell/PowerShell/issues/6833#top
Committee-ReviewedPS-Committee has reviewed this and made a decisionhttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Committee-Reviewed%22
Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifhttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Issue-Discussion%22
Resolution-DuplicateThe issue is a duplicate.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-Duplicate%22
WG-Engine-Providersbuilt-in PowerShell providers such as FileSystem, Certificates, Registry, etc.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Engine-Providers%22
Futurehttps://github.com/PowerShell/PowerShell/milestone/48
https://github.com/iSazonov
Ilya (iSazonov)https://github.com/iSazonov
on May 7, 2018https://github.com/PowerShell/PowerShell/issues/6833#issue-320802238
NormalizePath()https://github.com/PowerShell/PowerShell/blob/master/src/System.Management.Automation/namespaces/FileSystemProvider.cs#L97
IsPathRooted on Unixhttps://github.com/dotnet/corefx/blob/3cfab0ce729f8f9c09db0da42e56bd8bae0090de/src/Common/src/CoreLib/System/IO/Path.Unix.cs#L114
IsDirectorySeparatorhttps://github.com/dotnet/corefx/blob/16f26ba855f5cc6d52a738e8bc3856c6f77cf761/src/Common/src/System/IO/PathInternal.Unix.cs#L19
IsPathRooted on Windowshttps://github.com/dotnet/corefx/blob/3cfab0ce729f8f9c09db0da42e56bd8bae0090de/src/Common/src/CoreLib/System/IO/Path.Windows.cs#L158
IsDirectorySeparatorhttps://github.com/dotnet/corefx/blob/16f26ba855f5cc6d52a738e8bc3856c6f77cf761/src/Common/src/System/IO/PathInternal.Windows.cs#L241
NormalizeDirectorySeparators on Unixhttps://github.com/dotnet/corefx/blob/3cfab0ce729f8f9c09db0da42e56bd8bae0090de/src/Common/src/CoreLib/System/IO/PathInternal.Unix.cs#L42
NormalizeDirectorySeparators on Windowshttps://github.com/dotnet/corefx/blob/3cfab0ce729f8f9c09db0da42e56bd8bae0090de/src/Common/src/CoreLib/System/IO/PathInternal.Windows.cs#L352
Set-Location preserves case instead of matching filesystem on case-insensitive/preserving system #5678https://github.com/PowerShell/PowerShell/issues/5678
Location completion should be case-insensitive #1273https://github.com/PowerShell/PowerShell/issues/1273
Bug: can not handle "/" correctly when reading registry item #5536https://github.com/PowerShell/PowerShell/issues/5536
Replace string-compare-based test for copying to same file with more … #3441https://github.com/PowerShell/PowerShell/pull/3441
File mode in Linux should reflect Linux modes #1817https://github.com/PowerShell/PowerShell/issues/1817
Fix path normalization #1115https://github.com/PowerShell/PowerShell/issues/1115
On Unix, PowerShell will not find files with backslashes in their names #3666https://github.com/PowerShell/PowerShell/issues/3666
New-Item -ItemType SymbolicLink should support creating symlinks with relative paths #3500https://github.com/PowerShell/PowerShell/issues/3500
Ilya (iSazonov)https://github.com/iSazonov
Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifhttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Issue-Discussion%22
WG-Engine-Providersbuilt-in PowerShell providers such as FileSystem, Certificates, Registry, etc.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Engine-Providers%22
on May 7, 2018https://github.com/PowerShell/PowerShell/issues/6833#event-1612906396
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on May 8, 2018https://github.com/PowerShell/PowerShell/issues/6833#issuecomment-387413944
https://github.com/iSazonov
Ilya (iSazonov)https://github.com/iSazonov
on May 8, 2018https://github.com/PowerShell/PowerShell/issues/6833#issuecomment-387438247
#5536https://github.com/PowerShell/PowerShell/issues/5536
https://github.com/rjmholt
Rob Holt (rjmholt)https://github.com/rjmholt
on May 8, 2018https://github.com/PowerShell/PowerShell/issues/6833#issuecomment-387467144
https://github.com/iSazonov
Ilya (iSazonov)https://github.com/iSazonov
on May 8, 2018https://github.com/PowerShell/PowerShell/issues/6833#issuecomment-387486744
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on May 8, 2018https://github.com/PowerShell/PowerShell/issues/6833#issuecomment-387495578
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on May 8, 2018https://github.com/PowerShell/PowerShell/issues/6833#issuecomment-387499272
#4216https://github.com/PowerShell/PowerShell/issues/4216
Bruce Payette (BrucePay)https://github.com/BrucePay
Review - CommitteeThe PR/Issue needs a review from the PowerShell Committeehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Review%20-%20Committee%22
on May 11, 2018https://github.com/PowerShell/PowerShell/issues/6833#event-1621200117
https://github.com/iSazonov
Ilya (iSazonov)https://github.com/iSazonov
on May 11, 2018https://github.com/PowerShell/PowerShell/issues/6833#issuecomment-388456022
https://github.com/rjmholt
Rob Holt (rjmholt)https://github.com/rjmholt
on May 11, 2018https://github.com/PowerShell/PowerShell/issues/6833#issuecomment-388477118
we're doing it multiple timeshttps://github.com/PowerShell/PowerShell/issues/5536#issuecomment-371225592
#5536 (comment)https://github.com/PowerShell/PowerShell/issues/5536#issuecomment-387476149
container-enabled providershttps://msdn.microsoft.com/en-us/library/ee126198(v=vs.85).aspx
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on May 11, 2018https://github.com/PowerShell/PowerShell/issues/6833#issuecomment-388479627
Rob Holt (@rjmholt)https://github.com/rjmholt
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on May 11, 2018https://github.com/PowerShell/PowerShell/issues/6833#issuecomment-388488728
https://github.com/iSazonov
Ilya (iSazonov)https://github.com/iSazonov
on May 12, 2018https://github.com/PowerShell/PowerShell/issues/6833#issuecomment-388548153
https://github.com/iSazonov
Ilya (iSazonov)https://github.com/iSazonov
on May 12, 2018https://github.com/PowerShell/PowerShell/issues/6833#issuecomment-388552822
#3441https://github.com/PowerShell/PowerShell/pull/3441
#1817https://github.com/PowerShell/PowerShell/issues/1817
https://github.com/SteveL-MSFT
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
on May 16, 2018https://github.com/PowerShell/PowerShell/issues/6833#issuecomment-389690161
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
Committee-ReviewedPS-Committee has reviewed this and made a decisionhttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Committee-Reviewed%22
Review - CommitteeThe PR/Issue needs a review from the PowerShell Committeehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Review%20-%20Committee%22
on May 16, 2018https://github.com/PowerShell/PowerShell/issues/6833#event-1630767177
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
6.2.0-Considerhttps://github.com/PowerShell/PowerShell/milestone/42
on May 16, 2018https://github.com/PowerShell/PowerShell/issues/6833#event-1630767633
https://github.com/iSazonov
Ilya (iSazonov)https://github.com/iSazonov
on May 17, 2018https://github.com/PowerShell/PowerShell/issues/6833#issuecomment-389742932
Michael Klement (@mklement0)https://github.com/mklement0
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
6.2.0-Considerhttps://github.com/PowerShell/PowerShell/milestone/42
Futurehttps://github.com/PowerShell/PowerShell/milestone/48
on Jun 21, 2018https://github.com/PowerShell/PowerShell/issues/6833#event-1694653932
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
Resolution-DuplicateThe issue is a duplicate.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-Duplicate%22
on Mar 29, 2019https://github.com/PowerShell/PowerShell/issues/6833#event-2238128849
https://github.com/SteveL-MSFT
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
on Mar 29, 2019https://github.com/PowerShell/PowerShell/issues/6833#issuecomment-477851132
#9244https://github.com/PowerShell/PowerShell/issues/9244
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
completedhttps://github.com/PowerShell/PowerShell/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Mar 29, 2019https://github.com/PowerShell/PowerShell/issues/6833#event-2238128903
Sign up for freehttps://github.com/signup?return_to=https://github.com/PowerShell/PowerShell/issues/6833
Sign in to commenthttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/6833
Committee-ReviewedPS-Committee has reviewed this and made a decisionhttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Committee-Reviewed%22
Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifhttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Issue-Discussion%22
Resolution-DuplicateThe issue is a duplicate.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-Duplicate%22
WG-Engine-Providersbuilt-in PowerShell providers such as FileSystem, Certificates, Registry, etc.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Engine-Providers%22
FutureNo due datehttps://github.com/PowerShell/PowerShell/milestone/48
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.