Skip to content

URL.path includes leading Slash if the URL points to the root directory of a drive on Windows #977

Closed
@ahoppen

Description

@ahoppen
Member
print(URL(fileURLWithPath: #"C:\"#).path)

prints /C:. It should print C:\.

Also see #976, which is related.

Activity

jmschonfeld

jmschonfeld commented on Oct 10, 2024

@jmschonfeld
Contributor

I think this was likely resolved by #964 (unless this issue is specifically about something like C:\ only and not C:\foo?)

ahoppen

ahoppen commented on Oct 11, 2024

@ahoppen
MemberAuthor

It specific about C:\. I don't see the issue with non-root URLs

self-assigned this
on Oct 16, 2024
jrflat

jrflat commented on Dec 11, 2024

@jrflat
Contributor

This was fixed by #1038, please verify in a 6.1 or main snapshot, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

windowsIssue regarding compiling/running on Windows

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @jmschonfeld@jakepetroules@ahoppen@jrflat

      Issue actions

        `URL.path` includes leading Slash if the URL points to the root directory of a drive on Windows · Issue #977 · swiftlang/swift-foundation