diff --git a/xl-erasure-v1-common.go b/xl-erasure-v1-common.go index 3215232a3..716008d96 100644 --- a/xl-erasure-v1-common.go +++ b/xl-erasure-v1-common.go @@ -63,12 +63,13 @@ func (xl XL) listOnlineDisks(volume, path string) (onlineDisks []StorageAPI, mda for _, err := range errs { if err == errFileNotFound { notFoundCount++ + // If we have errors with file not found equal to the number of disks. + if notFoundCount > len(xl.storageDisks)-xl.readQuorum { + return nil, xlMetaV1{}, false, errFileNotFound + } } } - // If we have errors with file not found equal to the number of disks. - if notFoundCount == len(xl.storageDisks) { - return nil, xlMetaV1{}, false, errFileNotFound - } + highestVersion := int64(0) onlineDisks = make([]StorageAPI, len(xl.storageDisks)) // List all the file versions from partsMetadata list. diff --git a/xl-objects.go b/xl-objects.go index 30d805179..e5ca10bb5 100644 --- a/xl-objects.go +++ b/xl-objects.go @@ -191,11 +191,14 @@ func getMultipartObjectInfo(storage StorageAPI, bucket, object string) (info Mul offset := int64(0) r, err := storage.ReadFile(bucket, pathJoin(object, multipartMetaFile), offset) if err != nil { - return + return MultipartObjectInfo{}, err } decoder := json.NewDecoder(r) err = decoder.Decode(&info) - return + if err != nil { + return MultipartObjectInfo{}, err + } + return info, nil } // GetObjectInfo - get object info.