Skip to content
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

[SR-12366] standardizedFileURL inconsistent behavior on macOS and Linux #4395

Closed
swift-ci opened this issue Mar 13, 2020 · 2 comments
Closed
Assignees

Comments

@swift-ci
Copy link
Contributor

Previous ID SR-12366
Radar rdar://problem/60832812
Original Reporter Davidee (JIRA User)
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug
Assignee @spevans
Priority Medium

md5: 07d6a0d36f605f426c9a5ef13657dd24

Issue Description:

On macOS:
❯ swift
1> import Foundation
2> URL(fileURLWithPath: "/path/to/b/folder", isDirectory: true).standardizedFileURL.absoluteString == URL(fileURLWithPath: "/path/to/b/folder", isDirectory: true).absoluteString
$R0: Bool = true

On Linux:
❯ swift
1> import Foundation
2> URL(fileURLWithPath: "/path/to/b/folder", isDirectory: true).standardizedFileURL.absoluteString == URL(fileURLWithPath: "/path/to/b/folder", isDirectory: true).absoluteString
$R0: Bool = false

e.g. standardizedFileURL removes trailing slashes on Linux but keeps them on macOS

@beccadax
Copy link
Contributor

@swift-ci create

@spevans
Copy link
Collaborator

spevans commented May 31, 2020

#2808

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants