-
Notifications
You must be signed in to change notification settings - Fork 165
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.path returns forward slashes instead of backslashes on Windows #973
Comments
…disk `URL.path` returns forward slashes in the path on Windows (swiftlang/swift-foundation#973) where we expect backslashes. Work around that by defining our own `filePath` property that is backed by `withUnsafeFileSystemRepresentation`, which produces backslashes. rdar://137963660
…disk `URL.path` returns forward slashes in the path on Windows (swiftlang/swift-foundation#973) where we expect backslashes. Work around that by defining our own `filePath` property that is backed by `withUnsafeFileSystemRepresentation`, which produces backslashes. rdar://137963660
…disk `URL.path` returns forward slashes in the path on Windows (swiftlang/swift-foundation#973) where we expect backslashes. Work around that by defining our own `filePath` property that is backed by `withUnsafeFileSystemRepresentation`, which produces backslashes. rdar://137963660
…disk `URL.path` returns forward slashes in the path on Windows (swiftlang/swift-foundation#973) where we expect backslashes. Work around that by defining our own `filePath` property that is backed by `withUnsafeFileSystemRepresentation`, which produces backslashes. rdar://137963660
…disk `URL.path` returns forward slashes in the path on Windows (swiftlang/swift-foundation#973) where we expect backslashes. Work around that by defining our own `filePath` property that is backed by `withUnsafeFileSystemRepresentation`, which produces backslashes. rdar://137963660
…disk `URL.path` returns forward slashes in the path on Windows (swiftlang/swift-foundation#973) where we expect backslashes. Work around that by defining our own `filePath` property that is backed by `withUnsafeFileSystemRepresentation`, which produces backslashes. rdar://137963660
…disk `URL.path` returns forward slashes in the path on Windows (swiftlang/swift-foundation#973) where we expect backslashes. Work around that by defining our own `filePath` property that is backed by `withUnsafeFileSystemRepresentation`, which produces backslashes. rdar://137963660
…disk `URL.path` returns forward slashes in the path on Windows (swiftlang/swift-foundation#973) where we expect backslashes. Work around that by defining our own `filePath` property that is backed by `withUnsafeFileSystemRepresentation`, which produces backslashes. rdar://137963660
Based on my previous experience in this area, it's expected behavior. If you want the file path associated with a file URL, you must use In fact, I'd have expected your example to print |
Both print statements above print
C:/Users/alex
. I think they should printC:\Users\alex
.Maybe worth noting: Using
withUnsafeFileSystemRepresentation
returns backslashes. Should that be exposed throughURL.path
?The text was updated successfully, but these errors were encountered: