listing must return WalkDir() errors first (#19006)

This commit is contained in:
Harshavardhana 2024-02-07 13:20:07 -08:00 committed by GitHub
parent 5b1a74b6b2
commit d28bf71f25
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -305,6 +305,15 @@ func (z *erasureServerPools) listMerged(ctx context.Context, o listPathOptions,
cancelList()
wg.Wait()
// we should return 'errs' from per disk
if isAllNotFound(errs) {
if isAllVolumeNotFound(errs) {
return errVolumeNotFound
}
return nil
}
if err != nil {
return err
}
@ -313,13 +322,6 @@ func (z *erasureServerPools) listMerged(ctx context.Context, o listPathOptions,
return ctx.Err()
}
if isAllNotFound(errs) {
if isAllVolumeNotFound(errs) {
return errVolumeNotFound
}
return nil
}
for _, err := range errs {
if errors.Is(err, io.EOF) {
continue