Skip to content

cd-ing to a new drive and back does not restore path #6749

@rjmholt

Description

@rjmholt

Steps to reproduce

C:\Users\me\Documents> cd Z:
Z:\> cd C:

Expected behavior

Z:\> cd C:
C:\Users\me\Documents>

Actual behavior

Z:\> cd C:
C:\>

Environment data

> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.1.0-preview.1
PSEdition                      Core
GitCommitId                    v6.1.0-preview.1-99-g35d8de927b8e408461a5b4fc40ba20016c68433e
OS                             Microsoft Windows 10.0.16299
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

It looks like #6600 caused a regression. It seems to be Windows only. I tested with a9781de with no repro and then with 35d8de9 to successfully repro.

Credit to @jianyunt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.WG-Engine-Providersbuilt-in PowerShell providers such as FileSystem, Certificates, Registry, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions