Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Split-Path Fails on UNC #2202

Copy link
Copy link
@dchristian3188

Description

@dchristian3188
Issue body actions

Steps to reproduce

Split-Path -Path "\\server1\Share"
Split-Path -Path "\\server1\Share" -Leaf
Split-Path -Path "\\server1\Share" -Parent

Expected behavior

Split-Path -Path "\\server1\Share" should return "\\server1"
Split-Path -Path "\\server1\Share" -leaf should return "Share"
Split-Path -Path "\\server1\Share" -Parent should return "\\server1"

Actual behavior

Whenever split-pat is ran with a "2 level" UNC path it returns a null value.
3 levels work as excepted.
Example

Split-Path -Path "\\server1\Share\folder1" -Parent returns \\server1\Share
and
Split-Path -Path "\\server1\Share\folder1" -Leaf returns folder1

Environment data

Name Value


PSVersion 5.0.10586.494
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.10586.494
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.