FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix setting original path of filesystem object to not have extra trailing slash by SteveL-MSFT · Pull Request #10959 · PowerShell/PowerShell · GitHub

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

Fix setting original path of filesystem object to not have extra trailing slash#10959
Ilya (iSazonov) merged 2 commits into
PowerShell:masterfrom
SteveL-MSFT:root-dir

Conversation

Steve Lee (SteveL-MSFT) commented Oct 31, 2019
edited
Loading

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

Copy link
Copy Markdown
Member Author

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

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
Ilya (iSazonov) added this to the 7.0.0-preview.6 milestone Nov 1, 2019
Ilya (iSazonov) merged commit 4b84627 into PowerShell:master Nov 2, 2019

Copy link
Copy Markdown

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

Handy links:

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL