From d14624744ef7f221354d13e983a957f0f1e5b841 Mon Sep 17 00:00:00 2001
From: Carl Lange <carl@flax.ie>
Date: Sun, 30 Jun 2019 16:32:59 +0100
Subject: [PATCH] Use NewWithRegion not minio's region resolution

---
 pkg/s3/s3-client.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkg/s3/s3-client.go b/pkg/s3/s3-client.go
index 0f6c727..d146b3b 100644
--- a/pkg/s3/s3-client.go
+++ b/pkg/s3/s3-client.go
@@ -41,7 +41,7 @@ func newS3Client(cfg *Config) (*s3Client, error) {
 	if u.Port() != "" {
 		endpoint = u.Hostname() + ":" + u.Port()
 	}
-	minioClient, err := minio.New(endpoint, client.cfg.AccessKeyID, client.cfg.SecretAccessKey, ssl)
+	minioClient, err := minio.NewWithRegion(endpoint, client.cfg.AccessKeyID, client.cfg.SecretAccessKey, ssl, client.cfg.Region)
 	if err != nil {
 		return nil, err
 	}