Skip to content

Fix setting original path of filesystem object to not have extra trailing slash - #10959

Merged
Ilya (iSazonov) merged 2 commits into
PowerShell:masterfrom
SteveL-MSFT:root-dir
Nov 2, 2019
Merged

Ilya (iSazonov) merged 2 commits into
PowerShell:masterfrom
SteveL-MSFT:root-dir

Conversation

@SteveL-MSFT

@SteveL-MSFT Steve Lee (SteveL-MSFT) commented Oct 31, 2019 •

Copy link
Copy Markdown
Member

PR Summary

In the method to build the correct casing of a path, it handled the root of the drive, but later in the loop since the original path had a trailing slash, it added another one. Fix is to detect if the resulting path already has a trailing slash and don't add it.

PR Context

Fix #10956

PR Checklist

@SteveL-MSFT

Copy link
Copy Markdown
Member Author

Codacy uses PSSA which misidentified ternary operator as cmdlet. I opened PowerShell/PSScriptAnalyzer#1362

@iSazonov Ilya (iSazonov) added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Nov 1, 2019
@iSazonov Ilya (iSazonov) added this to the 7.0.0-preview.6 milestone Nov 1, 2019
@iSazonov
Ilya (iSazonov) merged commit 4b84627 into PowerShell:master Nov 2, 2019
@ghost

Copy link
Copy Markdown

🎉v7.0.0-preview.6 has been released which incorporates this pull request.:tada:

Handy links:

@SteveL-MSFT
Steve Lee (SteveL-MSFT) deleted the root-dir branch June 6, 2020 02:29
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Get-Item with a drive's root dir stringifies incorrectly

2 participants