Skip to content

Commit c8d596b

Browse files
committed
certain versions of swift fail to interopolate the string for path and theRest
1 parent b9e571d commit c8d596b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Foundation/NSURL.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,12 @@ public class NSURL : NSObject, NSSecureCoding, NSCopying {
223223
let theRest = CFURLCopyResourceSpecifier(cf)?._swiftObject
224224

225225
if let netLoc = netLoc {
226-
return "//\(netLoc)\(path ?? "")\(theRest ?? "")"
226+
let p = path ?? ""
227+
let rest = theRest ?? ""
228+
return "//\(netLoc)\(p)\(rest)"
227229
} else if let path = path {
228-
return "\(path)\(theRest ?? "")"
230+
let rest = theRest ?? ""
231+
return "\(path)\(rest)"
229232
} else {
230233
return theRest
231234
}

0 commit comments

Comments
 (0)