Fix Get-ChildItem -Path with wildcard char (#9257)

Unescape non-literal, non-glob path before existence checking.
This commit is contained in:
kwkam authored and Dongbo Wang committed 2019-05-31 10:14:39 -07:00
1 parent 259c4dd3f2
commit f0133bed8e
2 files changed
+18 -2

No files matched your search

@@ -1478,7 +1478,7 @@ namespace System.Management.Automation
string originalPath = path;
path =
Globber.GetProviderPath(
path,
context.SuppressWildcardExpansion ? path : WildcardPattern.Unescape(path),
context,
out provider,
out drive);
@@ -2441,7 +2441,7 @@ namespace System.Management.Automation
string providerPath =
Globber.GetProviderPath(
path,
context.SuppressWildcardExpansion ? path : WildcardPattern.Unescape(path),
context,
out provider,
out drive);