From 1db8b20fbc38fb95402c2a0e9c3dfc5e65691005 Mon Sep 17 00:00:00 2001 From: albertony <12441419+albertony@users.noreply.github.com> Date: Thu, 15 Aug 2024 20:20:10 +0200 Subject: [PATCH] s3: fix incorrect conversion between integer types --- backend/s3/s3.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/s3/s3.go b/backend/s3/s3.go index e5810cfc2..527fae12e 100644 --- a/backend/s3/s3.go +++ b/backend/s3/s3.go @@ -5007,11 +5007,11 @@ func (f *Fs) Command(ctx context.Context, name string, arg []string, opt map[str RestoreRequest: &types.RestoreRequest{}, } if lifetime := opt["lifetime"]; lifetime != "" { - ilifetime, err := strconv.ParseInt(lifetime, 10, 64) - ilifetime32 := int32(ilifetime) + ilifetime, err := strconv.ParseInt(lifetime, 10, 32) if err != nil { return nil, fmt.Errorf("bad lifetime: %w", err) } + ilifetime32 := int32(ilifetime) req.RestoreRequest.Days = &ilifetime32 } if priority := opt["priority"]; priority != "" {