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

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

No files matched your search

+5 -3
View File
@@ -46,15 +46,17 @@ func (fs fsObjects) CompleteMultipartUpload(bucket string, object string, upload
if !IsValidBucketName(bucket) {
return "", BucketNameInvalid{Bucket: bucket}
}
// Verify whether the bucket exists.
if !isBucketExist(fs.storage, bucket) {
return "", BucketNotFound{Bucket: bucket}
}
if !IsValidObjectName(object) {
return "", ObjectNameInvalid{
Bucket: bucket,
Object: object,
}
}
if status, err := isUploadIDExists(fs.storage, bucket, object, uploadID); err != nil {
return "", err
} else if !status {
if !isUploadIDExists(fs.storage, bucket, object, uploadID) {
return "", InvalidUploadID{UploadID: uploadID}
}