You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importFoundationvarurl = URL(string: "https://github.com/karwa/swift%2Furl")!
// Automatic decoding makes it look like a path separator.url.path// "/karwa/swift/url"// URL.pathComponents splits the '.path' property internally.forcomponentinurl.pathComponents {
print(component) // "/", "karwa", "swift", "url"
}
// URL.deleteLastPathComponent() uses the raw path instead.// It looks like it deleted the last 2 components.url.deleteLastPathComponent() // "https://github.com/karwa/"
This comes from NSURL._pathComponents, which uses the .path property internally. path is automatically-percent decoded; _pathComponents should be splitting the raw, encoded path instead.
The text was updated successfully, but these errors were encountered:
Environment
Xcode 13 GM, macOS 11.6
Additional Detail from JIRA
md5: 7ebd8d45f23feb64d2bd57061f43ab9a
Issue Description:
Consider:
This comes from NSURL._pathComponents, which uses the .path property internally. path is automatically-percent decoded; _pathComponents should be splitting the raw, encoded path instead.
The text was updated successfully, but these errors were encountered: