We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac845c4 commit d0e799cCopy full SHA for d0e799c
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