Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 12, 2019

Conversation

SteveL-MSFT
Copy link
Member

@SteveL-MSFT SteveL-MSFT commented Nov 7, 2019

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 SteveL-MSFT requested a review from anmenaga as a code owner November 7, 2019 20:14
@SteveL-MSFT
Copy link
Member Author

@PoshChan please retry static

@PoshChan
Copy link
Collaborator

PoshChan commented Nov 7, 2019

@SteveL-MSFT, successfully started retry of PowerShell-CI-static-analysis

…stem.Tests.ps1

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

ghost commented Nov 21, 2019

🎉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