mirror of
https://github.com/restic/restic.git
synced 2026-09-26 14:00:29 +00:00
+4
@@ -47,6 +47,10 @@ func (c Client) BucketExists(bucketName string) (bool, error) {
|
||||
return false, err
|
||||
}
|
||||
if resp != nil {
|
||||
resperr := httpRespToErrorResponse(resp, bucketName, "")
|
||||
if ToErrorResponse(resperr).Code == "NoSuchBucket" {
|
||||
return false, nil
|
||||
}
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return false, httpRespToErrorResponse(resp, bucketName, "")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user