Use getObjectInfo() in both FS and XL ListObjects() to simplify and to return complete object information (#3247)

This commit is contained in:
Anis Elleuch
2016-11-13 20:48:02 +01:00
committed by Harshavardhana
parent 716316f711
commit 380d6c6435
4 changed files with 39 additions and 60 deletions

View File

@@ -93,13 +93,7 @@ func (xl xlObjects) listObjects(bucket, prefix, marker, delimiter string, maxKey
result.Prefixes = append(result.Prefixes, objInfo.Name)
continue
}
result.Objects = append(result.Objects, ObjectInfo{
Name: objInfo.Name,
ModTime: objInfo.ModTime,
Size: objInfo.Size,
MD5Sum: objInfo.MD5Sum,
IsDir: false,
})
result.Objects = append(result.Objects, objInfo)
}
return result, nil
}