mirror of
https://github.com/pgsty/minio.git
synced 2026-07-21 05:00:22 +03:00
Default DeleteReplication rule status if unspecified. (#15301)
Since this is a MinIO specific extension in the replication config, default this to Disabled to allow other sdks to be used to configure replication rules. Co-authored-by: Poorna Krishnamoorthy <poorna@minio.io>
This commit is contained in:
@@ -62,6 +62,12 @@ func ParseConfig(reader io.Reader) (*Config, error) {
|
||||
},
|
||||
}
|
||||
}
|
||||
// Default DeleteReplication to disabled if unset.
|
||||
if len(config.Rules[i].DeleteReplication.Status) == 0 {
|
||||
config.Rules[i].DeleteReplication = DeleteReplication{
|
||||
Status: Disabled,
|
||||
}
|
||||
}
|
||||
}
|
||||
return &config, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user