```swift print(URL(fileURLWithPath: #"C:\"#).path) ``` prints `/C:`. It should print `C:\`. Also see https://github.com/swiftlang/swift-foundation/issues/976, which is related.
Activity
jmschonfeld commentedon Oct 10, 2024
I think this was likely resolved by #964 (unless this issue is specifically about something like
C:\
only and notC:\foo
?)ahoppen commentedon Oct 11, 2024
It specific about
C:\
. I don't see the issue with non-root URLsURL
prepends "/" at beginning ofpath
property, breaking compatibility #857URL.path
should not strip trailing slash for root paths on Windows #1038jrflat commentedon Dec 11, 2024
This was fixed by #1038, please verify in a 6.1 or main snapshot, thanks!