Skip to content

Commit 56ac854

Browse files
authored
Update URLBuilder.swift
1 parent a8286ca commit 56ac854

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

Sources/S3/URLBuilder/URLBuilder.swift

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,10 @@ extension Region {
1414

1515
/// Host URL including scheme
1616
public func hostUrlString(bucket: String? = nil) -> String {
17-
if hostName != nil {
18-
return urlProtocol + host.finished(with: "/") + (bucket ?? "")
17+
if let bucket = bucket {
18+
return urlProtocol + host.finished(with: "/") + bucket
1919
}
20-
21-
var bucket = bucket
22-
if let b = bucket, !b.isEmpty {
23-
bucket = b + "."
24-
}
25-
26-
return urlProtocol + (bucket ?? "") + host.finished(with: "/")
20+
return urlProtocol + host.finished(with: "/")
2721
}
2822

2923
private var urlProtocol: String {

0 commit comments

Comments
 (0)