Skip to content

Getting path of Windows file URL adds a leading backslash before drive #952

@ahoppen

Description

@ahoppen
import Foundation

let url = URL(string: "file:///c%3A/Users/alex")!
print(url.path)

Outputs /c:/Users/alex. As far as I can tell, the output should be c:/Users/alex (this is also what swift-corelibs-foundation produced).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions