-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
URL.withUnsafeFileSystemRepresentation
drops trailing backslash even if it is significant on Windows
#976
Comments
macshome
added a commit
to macshome/swift-format
that referenced
this issue
Dec 6, 2024
Now that swiftlang/swift-foundation#976 and swiftlang/swift-foundation#980 are fixed we can clean this code up a bit by removing the empty path check on Linux and by using the native `PathCchIsRoot` on Windows.
macshome
added a commit
to macshome/swift-format
that referenced
this issue
Dec 9, 2024
Now that swiftlang/swift-foundation#976 and swiftlang/swift-foundation#980 are fixed we can clean this code up a bit by removing the empty path check on Linux and by using the native `PathCchIsRoot` on Windows. Existing code is retained for toolchains <6.1
macshome
added a commit
to macshome/swift-format
that referenced
this issue
Dec 10, 2024
Now that swiftlang/swift-foundation#976 and swiftlang/swift-foundation#980 are fixed we can clean this code up a bit by removing the empty path check on Linux and by using the native `PathCchIsRoot` on Windows. Existing code is retained for toolchains <6.1
ahoppen
pushed a commit
to macshome/swift-format
that referenced
this issue
Dec 10, 2024
Now that swiftlang/swift-foundation#976 and swiftlang/swift-foundation#980 are fixed we can clean this code up a bit by removing the empty path check on Linux and by using the native `PathCchIsRoot` on Windows. Existing code is retained for toolchains <6.1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
prints
C:
. Dropping the trailing backslash is problematic here becauseC:\
is considered a root directory in Windows butC:
is not (see table of examples in https://learn.microsoft.com/en-us/windows/win32/api/pathcch/nf-pathcch-pathcchisroot).The text was updated successfully, but these errors were encountered: