Skip to content

Windows file URL prepends "/" at beginning of path property, breaking compatibility #857

Closed
@gregcotten

Description

@gregcotten

For example, initialize a simple file URL and print its path:

let url = URL(fileURLWithPath: "C:/Test")
print(url.path)

In Swift 5.10.1, you get: C:/Test
In Swift 6.0 (August 7 snapshot) you get: /C:/Test

Maybe this is intended, but it definitely breaks my usage of passing file URL paths as arguments into a spawned Process for my build tools.

Metadata

Metadata

Assignees

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