Skip to content

Commit 7733e33

Browse files
authored
PBM-1494 Added condition if S3 EntypointURL is empty (#1109)
1 parent c270122 commit 7733e33

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

pbm/config/config.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,10 +309,14 @@ func (s *StorageConf) Path() string {
309309
switch s.Type {
310310
case storage.S3:
311311
path = s.S3.EndpointURL
312-
if !strings.Contains(path, "://") {
313-
path = "s3://" + path
312+
if path == "" {
313+
path = "s3://" + s.S3.Bucket
314+
} else {
315+
if !strings.Contains(path, "://") {
316+
path = "s3://" + path
317+
}
318+
path += "/" + s.S3.Bucket
314319
}
315-
path += "/" + s.S3.Bucket
316320
if s.S3.Prefix != "" {
317321
path += "/" + s.S3.Prefix
318322
}

0 commit comments

Comments
 (0)