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.
This commit is contained in:
Anis Elleuch 2017-03-03 19:12:43 +01:00 committed by Harshavardhana
parent e5d4e7aa9d
commit 28c53a3555

View file

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