Skip to content

std::path::Path prefix parsing in Windows is inconsistent with other OS's #100833

@ncihnegn

Description

@ncihnegn

I tried this code:

Path("//tmp/abs_evil2.txt").components()

I expected to see this happen:

RootDir, RootDir, Normal("tmp"), Normal("abs_evil2.txt")

Instead, this happened:

Prefix(PrefixComponent { raw: "//tmp/abs_evil2.txt", parsed: UNC("tmp", "abs_evil2.txt") })

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-ioArea: `std::io`, `std::fs`, `std::net` and `std::path`C-bugCategory: This is a bug.O-windowsOperating system: Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions