Skip to content

Set-Location preserves case instead of matching filesystem on case-insensitive/preserving system #5678

@jazzdelightsme

Description

@jazzdelightsme

Steps to reproduce

mkdir Foo
cd foo

Expected behavior

    Working directory ends in `\Foo`.

Actual behavior

    Working directory ends in `\foo`. (note the difference in case)

Remarks

I originally thought this issue belonged with #1273, but that is about tab completion and globbing on non-Windows platforms, whereas this does not involve tabbing or globbing, and is on Windows.

This problem can cause problems with git and other things.

If I use cmd.exe instead, it gives the expected/desired results.

On case-sensitive systems, I don't know what the correct behavior should be (reject it if the path doesn't exist, or automagically switch to the fs-matching case)... perhaps it should be controlled by the same settings as in #1273.

Environment data

PS C:\Users\danthom> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.17047.1000
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17047.1000
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Metadata

Metadata

Assignees

Labels

Resolution-FixedThe issue is fixed.WG-Engine-Providersbuilt-in PowerShell providers such as FileSystem, Certificates, Registry, etc.Waiting - DotNetCorewaiting on a fix/change in .NET

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions