2
2
mirror of https://github.com/octoleo/restic.git synced 2024-06-06 02:50:50 +00:00

minio: Apply fix

https://github.com/minio/minio-go/issues/677
This commit is contained in:
Alexander Neumann 2017-05-13 13:18:42 +02:00
parent 19daefd04e
commit f43d34899d

View File

@ -553,7 +553,7 @@ func (c Client) executeMethod(method string, metadata requestMetadata) (res *htt
// Bucket region if set in error response and the error
// code dictates invalid region, we can retry the request
// with the new region.
if errResponse.Code == "InvalidRegion" && errResponse.Region != "" {
if errResponse.Region != "" && res.StatusCode == http.StatusBadRequest {
c.bucketLocCache.Set(metadata.bucketName, errResponse.Region)
continue // Retry.
}