2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-30 00:33:57 +00:00

Revert "minio: Apply fix"

This reverts commit f43d34899d.
This commit is contained in:
Alexander Neumann 2017-05-13 19:41:55 +02:00
parent f43d34899d
commit 0249c16b04

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 // Bucket region if set in error response and the error
// code dictates invalid region, we can retry the request // code dictates invalid region, we can retry the request
// with the new region. // with the new region.
if errResponse.Region != "" && res.StatusCode == http.StatusBadRequest { if errResponse.Code == "InvalidRegion" && errResponse.Region != "" {
c.bucketLocCache.Set(metadata.bucketName, errResponse.Region) c.bucketLocCache.Set(metadata.bucketName, errResponse.Region)
continue // Retry. continue // Retry.
} }