Skip to content

Proposal: Resolve-Path should return a un-ambiguous single path #6197

@Jaykul

Description

@Jaykul

I think that Resolve-Path should normalize the path. Do we need a separate cmdlet for that?

Currently, it seems to just pass through whatever you feed it:

I ♥ PS> Push-Location C:\
I ♥ PS> Resolve-Path \Windows | % ToString
\Windows

I ♥ PS> Push-Location FILESYSTEM::C:\
I ♥ PS> Resolve-Path C:\Windows | % ToString
C:\Windows

I ♥ PS> Resolve-Path FileSystem::C:\Windows | % ToString
FileSystem::C:\Windows

I ♥ PS> Resolve-Path Microsoft.PowerShell.Core\FileSystem::C:\Windows | % ToString
Microsoft.PowerShell.Core\FileSystem::C:\Windows

I ♥ PS> Resolve-Path Microsoft.PowerShell.Core\FILESYSTEM::\WINDOWS | % ToString
Microsoft.PowerShell.Core\FILESYSTEM::\WINDOWS

How can I test if two paths refer to the same location?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifResolution-No ActivityIssue has had no activity for 6 months or moreWG-Cmdlets-Managementcmdlets in the Microsoft.PowerShell.Management module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions