We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 59340e1 + d0e799c commit 1b9ee18Copy full SHA for 1b9ee18
Foundation/URL.swift
@@ -692,7 +692,8 @@ public struct URL : ReferenceConvertible, Equatable {
692
} else {
693
// Now we need to do something more expensive
694
if var c = URLComponents(url: self, resolvingAgainstBaseURL: true) {
695
- c.path = c.path._stringByAppendingPathComponent(pathComponent)
+ let path = c.path._stringByAppendingPathComponent(pathComponent)
696
+ c.path = isDirectory ? path + "/" : path
697
698
if let result = c.url {
699
return result
0 commit comments