skip files that are not erasure objects or directories (#10926)

without this change WalkDir reports errors while
trying to read `format.json/xl.meta` which is a
replicated file
This commit is contained in:
Harshavardhana 2020-11-19 09:15:09 -08:00 committed by GitHub
parent 9dea7020f0
commit 70d2c2ccc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -205,6 +205,8 @@ func (s *xlStorage) WalkDir(ctx context.Context, opts WalkDirOptions, wr io.Writ
if !isDirObj {
dirStack = append(dirStack, meta.name+slashSeparator)
}
case isSysErrNotDir(err):
// skip
default:
logger.LogIf(ctx, err)
}