mirror of
https://github.com/minio/minio.git
synced 2025-04-23 11:55:47 -04:00
auto enable versioning with object locking (#9967)
this is to preserve versioning for object-locked buckets from current release code.
This commit is contained in:
parent
2be20588bf
commit
03b84091fc
@ -186,6 +186,10 @@ func (b *BucketMetadata) parseAllConfigs(ctx context.Context, objectAPI ObjectLa
|
|||||||
b.taggingConfig = nil
|
b.taggingConfig = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if bytes.Equal(b.ObjectLockConfigXML, enabledBucketObjectLockConfig) {
|
||||||
|
b.VersioningConfigXML = enabledBucketVersioningConfig
|
||||||
|
}
|
||||||
|
|
||||||
if len(b.ObjectLockConfigXML) != 0 {
|
if len(b.ObjectLockConfigXML) != 0 {
|
||||||
b.objectLockConfig, err = objectlock.ParseObjectLockConfig(bytes.NewReader(b.ObjectLockConfigXML))
|
b.objectLockConfig, err = objectlock.ParseObjectLockConfig(bytes.NewReader(b.ObjectLockConfigXML))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user