fix: remove check if lock config exists before set (#5203)

This commit is contained in:
jiuker
2025-05-19 01:05:02 -07:00
committed by GitHub
parent b9f30231ca
commit 18c1c94d85
+1 -2
View File
@@ -148,11 +148,10 @@ func mainRetentionSet(cliCtx *cli.Context) error {
target, versionID, recursive, rewind, withVersions, mode, validity, unit, bypass, bucketMode := parseSetRetentionArgs(cliCtx)
fatalIfBucketLockNotSupported(ctx, target)
if bucketMode {
return setBucketLock(target, mode, validity, unit)
}
fatalIfBucketLockNotSupported(ctx, target)
if withVersions && rewind.IsZero() {
rewind = time.Now().UTC()