mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
simplify channel send() in WalkDir() (#18186)
This commit is contained in:
parent
7cd08594f6
commit
ec30bb89a4
@ -251,10 +251,8 @@ func (s *xlStorage) WalkDir(ctx context.Context, opts WalkDirOptions, wr io.Writ
|
||||
meta.name = strings.TrimSuffix(meta.name, SlashSeparator)
|
||||
meta.name = pathJoinBuf(sb, current, meta.name)
|
||||
meta.name = decodeDirObject(meta.name)
|
||||
if err := send(meta); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
return send(meta)
|
||||
}
|
||||
// Check legacy.
|
||||
if HasSuffix(entry, xlStorageFormatFileV1) && legacy {
|
||||
@ -270,10 +268,8 @@ func (s *xlStorage) WalkDir(ctx context.Context, opts WalkDirOptions, wr io.Writ
|
||||
meta.name = strings.TrimSuffix(entry, xlStorageFormatFileV1)
|
||||
meta.name = strings.TrimSuffix(meta.name, SlashSeparator)
|
||||
meta.name = pathJoinBuf(sb, current, meta.name)
|
||||
if err := send(meta); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
|
||||
return send(meta)
|
||||
}
|
||||
// Skip all other files.
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user