Skip to content

Globber overly aggressive in unescaping wildcard characters #19627

@SteveL-MSFT

Description

@SteveL-MSFT

Prerequisites

Steps to reproduce

On Windows: get-childitem \\?\c:`

Expected behavior

Since `?` is escaped by the backtick, no globbing should occur

Actual behavior

Globbing occurs because the path has been unescaped somewhere removing the backtick.  You need to escape it twice: `get-childitem \\``?\c:\` to get it to work correctly.

Error details

No response

Environment data

Name                           Value
----                           -----
PSVersion                      7.4.0-preview.3
PSEdition                      Core
GitCommitId                    7.4.0-preview.3
OS                             Microsoft Windows 10.0.25324
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs-TriageThe issue is new and needs to be triaged by a work group.Resolution-No ActivityIssue has had no activity for 6 months or more

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions