Remove leading zero strings in return value of (*xlMetaV2)getDataDirs() (#19567)

remove leading zero strings in return value of getDataDirs()
This commit is contained in:
Seiya 2024-04-23 14:07:37 +09:00 committed by GitHub
parent b5a09ff96b
commit 5ea5ab162b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -1245,7 +1245,7 @@ func (x *xlMetaV2) setIdx(idx int, ver xlMetaV2Version) (err error) {
// getDataDirs will return all data directories in the metadata
// as well as all version ids used for inline data.
func (x *xlMetaV2) getDataDirs() ([]string, error) {
dds := make([]string, len(x.versions)*2)
dds := make([]string, 0, len(x.versions)*2)
for i, ver := range x.versions {
if ver.header.Type == DeleteType {
continue