Browse Source

obj: Make checkBucketExist() returns all errors (#3843)

This function was returning BucketNotFound for all errors
which at least hides the fact that disks could be corrupted.
This commit fixes the behavior by returning all errors that,
are, by the way, Object API errors.
pull/3845/head
Anis Elleuch 9 years ago
committed by Harshavardhana
parent
commit
28c53a3555
  1. 2
      cmd/object-api-input-checks.go

2
cmd/object-api-input-checks.go

@ -151,7 +151,7 @@ func checkBucketExist(bucket string, obj ObjectLayer) error {
} }
_, err := obj.GetBucketInfo(bucket) _, err := obj.GetBucketInfo(bucket)
if err != nil { if err != nil {
return BucketNotFound{Bucket: bucket}
return errorCause(err)
} }
return nil return nil
} }
Loading…
Cancel
Save