Skip to content

Handle exception if enumerating files fails when rebuilding path to have correct casing - #11014

Merged
Andrew (anmenaga) merged 2 commits into
PowerShell:masterfrom
SteveL-MSFT:appx-path
Nov 12, 2019
Merged

Andrew (anmenaga) merged 2 commits into
PowerShell:masterfrom
SteveL-MSFT:appx-path

Conversation

@SteveL-MSFT

@SteveL-MSFT Steve Lee (SteveL-MSFT) commented Nov 7, 2019 •

Copy link
Copy Markdown
Member

PR Summary

In the code to reconstruct a path with correct casing, it has to go through each segment and use enumeration to get the correct case. On some directories the user may not have permission to enumerate although they can still read a file/folder within that directory. Fix is if there is an exception during enumeration, fail gracefully by just returning back the original path.

PR Context

Fix #11013

PR Checklist

@SteveL-MSFT

Copy link
Copy Markdown
Member Author

PoshChan-Bot (@PoshChan) please retry static

@PoshChan

Copy link
Copy Markdown
Collaborator

Steve Lee (@SteveL-MSFT), successfully started retry of PowerShell-CI-static-analysis

…stem.Tests.ps1

Co-Authored-By: Ilya <darpa@yandex.ru>
@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 8, 2019
@iSazonov Ilya (iSazonov) added this to the 7.0.0-preview.6 milestone Nov 8, 2019
@anmenaga
Andrew (anmenaga) merged commit e185f89 into PowerShell:master Nov 12, 2019
@ghost

Copy link
Copy Markdown

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

Handy links:

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.

AppX package installation locations cannot be targeted with Get-Item / Get-ChildItem

4 participants