xl/fs: isFunctions should only return boolean. (#1525)

log the unrecognize errors.
This commit is contained in:
Harshavardhana
2016-05-08 01:58:05 -07:00
committed by Anand Babu (AB) Periasamy
parent 937d68202d
commit a56d5ef415
9 changed files with 113 additions and 90 deletions

View File

@@ -96,15 +96,17 @@ func (xl xlObjects) CompleteMultipartUpload(bucket string, object string, upload
if !IsValidBucketName(bucket) {
return "", BucketNameInvalid{Bucket: bucket}
}
// Verify whether the bucket exists.
if !isBucketExist(xl.storage, bucket) {
return "", BucketNotFound{Bucket: bucket}
}
if !IsValidObjectName(object) {
return "", ObjectNameInvalid{
Bucket: bucket,
Object: object,
}
}
if status, err := isUploadIDExists(xl.storage, bucket, object, uploadID); err != nil {
return "", err
} else if !status {
if !isUploadIDExists(xl.storage, bucket, object, uploadID) {
return "", InvalidUploadID{UploadID: uploadID}
}
var metadata = MultipartObjectInfo{}