mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
ilm: Remove a 'null' version if not latest (#10494)
If the ILM document requires removing noncurrent versions, the the server should be able to remove 'null' versions as well. 'null' versions are created when versioning is not enabled or suspended.
This commit is contained in:
parent
b2536476c9
commit
24cab7f9df
@ -103,11 +103,17 @@ func (fi FileInfo) ToObjectInfo(bucket, object string) ObjectInfo {
|
||||
IsDir: true,
|
||||
}
|
||||
}
|
||||
|
||||
versionID := fi.VersionID
|
||||
if globalBucketVersioningSys.Enabled(bucket) && versionID == "" {
|
||||
versionID = nullVersionID
|
||||
}
|
||||
|
||||
objInfo := ObjectInfo{
|
||||
IsDir: false,
|
||||
Bucket: bucket,
|
||||
Name: object,
|
||||
VersionID: fi.VersionID,
|
||||
VersionID: versionID,
|
||||
IsLatest: fi.IsLatest,
|
||||
DeleteMarker: fi.Deleted,
|
||||
Size: fi.Size,
|
||||
|
Loading…
Reference in New Issue
Block a user