From 9d99cfbb7ed0d0f83bde6a31c7c4ab33707dcc5c Mon Sep 17 00:00:00 2001 From: Anis Eleuch Date: Mon, 14 Aug 2023 21:04:26 +0100 Subject: [PATCH] mv: Do not error out when a bucket has an object lock config (#4654) It appears that this code is coming from the old days when locking was implemented before versioning; It does not make sense now to make mv errors out when a bucket has a locking configuration. --- cmd/mv-main.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/cmd/mv-main.go b/cmd/mv-main.go index e1459194..ca9b84cb 100644 --- a/cmd/mv-main.go +++ b/cmd/mv-main.go @@ -238,18 +238,6 @@ func mainMove(cliCtx *cli.Context) error { } } - // Check if source URLs does not have object locking enabled - // since we cannot move them (remove them from the source) - for _, urlStr := range cliCtx.Args()[:cliCtx.NArg()-1] { - enabled, err := isBucketLockEnabled(ctx, urlStr) - if err != nil { - fatalIf(err.Trace(), "Unable to get bucket lock configuration of `%s`", urlStr) - } - if enabled { - fatalIf(errDummy().Trace(), fmt.Sprintf("Object lock configuration is enabled on the specified bucket in alias %v.", urlStr)) - } - } - // Additional command speific theme customization. console.SetColor("Copy", color.New(color.FgGreen, color.Bold))