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

[6.0.x] URL.deletingLastPathComponent() should append .. in special cases #1022

Merged

Conversation

jrflat
Copy link
Contributor

@jrflat jrflat commented Oct 29, 2024

Explanation: Corrects URL.deletingLastPathComponent() behavior to append .. in special cases, such as when the relative path is empty or ends in a .. segment. This makes .deletingLastPathComponent() semantically accurate when resolving against a base URL.
Scope: Only impacts URL.deletingLastPathComponent() in special cases of relative paths.
Original PR: #989
Risk: Low - Small change to fix behavior for these edge cases.
Testing: Added comprehensive unit test, swift-ci, stable in main
Reviewer: @itingliu

Resolves #922 for release/6.0

@jrflat
Copy link
Contributor Author

jrflat commented Oct 29, 2024

@swift-ci please test

@jrflat
Copy link
Contributor Author

jrflat commented Oct 29, 2024

Oh, the test expects the behavior from the String.deletingLastPathComponent() fixes in #1013, which is not yet in release/6.0.

@jrflat
Copy link
Contributor Author

jrflat commented Oct 30, 2024

@swift-ci please test

@jrflat
Copy link
Contributor Author

jrflat commented Oct 30, 2024

Tests pass now that #1013 is merged

@jrflat jrflat merged commit a28f6ac into swiftlang:release/6.0 Nov 4, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants