XL: Don't return ignored errors in listDirFactory (#3935)

Previously, erasure backend's `listDirFactory` may return errors which
were explicitly ignored. With this change, it returns nil. Superfluous
checks at higher-layers for ignored errors are removed as well.
This commit is contained in:
Krishnan Parthasarathi
2017-03-20 23:39:05 +05:30
committed by Harshavardhana
parent 1396e91dd1
commit eb02261642
4 changed files with 17 additions and 32 deletions

View File

@@ -107,10 +107,6 @@ func (xl xlObjects) listObjectsHeal(bucket, prefix, marker, delimiter string, ma
}
// For any walk error return right away.
if walkResult.err != nil {
// File not found is a valid case.
if walkResult.err == errFileNotFound {
return ListObjectsInfo{}, nil
}
return ListObjectsInfo{}, toObjectErr(walkResult.err, bucket, prefix)
}
entry := walkResult.entry
@@ -325,12 +321,6 @@ func (xl xlObjects) listMultipartUploadsHeal(bucket, prefix, keyMarker,
}
// Collect uploads until maxUploads limit is reached.
for walkResult := range walkerCh {
// Ignore errors like errDiskNotFound
// and errFileNotFound.
if isErrIgnored(walkResult.err,
xlTreeWalkIgnoredErrs...) {
continue
}
// For any error during tree walk we should
// return right away.
if walkResult.err != nil {