Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1477,7 +1477,7 @@ internal void GetChildItems(
string originalPath = path;
path =
Globber.GetProviderPath(
path,
context.SuppressWildcardExpansion ? path : WildcardPattern.Unescape(path),
context,
out provider,
out drive);
Expand Down Expand Up @@ -2441,7 +2441,7 @@ internal void GetChildNames(

string providerPath =
Globber.GetProviderPath(
path,
context.SuppressWildcardExpansion ? path : WildcardPattern.Unescape(path),
context,
out provider,
out drive);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,22 @@ Describe "Get-ChildItem" -Tags "CI" {
}
}

Describe "Get-ChildItem with special path" -Tags "CI" {

BeforeAll {
$bracketDirName = "Test[Dir]"
$bracketDir = "Test``[Dir``]"
$bracketPath = Join-Path $TestDrive $bracketDir
$null = New-Item -Path $TestDrive -Name $bracketDirName -ItemType Directory -Force
}

It "Should list files in directory with name containing bracket char" {
$null = New-Item -Path $bracketPath -Name file1.txt -ItemType File
$null = New-Item -Path $bracketPath -Name file2.txt -ItemType File
Get-ChildItem -Path $bracketPath | Should -HaveCount 2
}
}

Describe 'FileSystem Provider Formatting' -Tag "CI","RequireAdminOnWindows" {

BeforeAll {
Expand Down