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
master
Harshavardhana 4 years ago committed by GitHub
parent 9dea7020f0
commit 70d2c2ccc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      cmd/metacache-walk.go

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

Loading…
Cancel
Save