ilm: Remove null version if not latest with proper config (#10467)

This commit is contained in:
Anis Elleuch 2020-09-11 22:20:09 +01:00 committed by GitHub
parent 48919de301
commit 4b6264da7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -341,7 +341,10 @@ func (j xlMetaV2DeleteMarker) ToFileInfo(volume, path string) (FileInfo, error)
// check if the version is not "null"
if !bytes.Equal(j.VersionID[:], uv[:]) {
versionID = uuid.UUID(j.VersionID).String()
} else {
versionID = nullVersionID
}
fi := FileInfo{
Volume: volume,
Name: path,
@ -358,7 +361,10 @@ func (j xlMetaV2Object) ToFileInfo(volume, path string) (FileInfo, error) {
// check if the version is not "null"
if !bytes.Equal(j.VersionID[:], uv[:]) {
versionID = uuid.UUID(j.VersionID).String()
} else {
versionID = nullVersionID
}
fi := FileInfo{
Volume: volume,
Name: path,