mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05: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
|
||||
}
|
||||
|
||||
if bytes.Equal(b.ObjectLockConfigXML, enabledBucketObjectLockConfig) {
|
||||
b.VersioningConfigXML = enabledBucketVersioningConfig
|
||||
}
|
||||
|
||||
if len(b.ObjectLockConfigXML) != 0 {
|
||||
b.objectLockConfig, err = objectlock.ParseObjectLockConfig(bytes.NewReader(b.ObjectLockConfigXML))
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user