forked from TrueCloudLab/frostfs-node
[#1972] cli: Fix lifetime flag in the lock
command
That part of the code was refactored incorrectly. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
2849e465f9
commit
a77392e9ce
1 changed files with 3 additions and 1 deletions
|
@ -63,9 +63,11 @@ var objectLockCmd = &cobra.Command{
|
|||
currEpoch, err := internalclient.GetCurrentEpoch(ctx, endpoint)
|
||||
common.ExitOnErr(cmd, "Request current epoch: %w", err)
|
||||
|
||||
exp += currEpoch
|
||||
exp = currEpoch + lifetime
|
||||
}
|
||||
|
||||
common.PrintVerbose("Lock object will expire at %d epoch", exp)
|
||||
|
||||
var expirationAttr objectSDK.Attribute
|
||||
expirationAttr.SetKey(objectV2.SysAttributeExpEpoch)
|
||||
expirationAttr.SetValue(strconv.FormatUint(exp, 10))
|
||||
|
|
Loading…
Reference in a new issue