From 319ac225e4287b8585aa0f0b05b3584ee7dd6dd7 Mon Sep 17 00:00:00 2001 From: Vincent Murphy Date: Thu, 12 May 2022 20:42:37 +0100 Subject: [PATCH] s3: backend restore command to skip non-GLACIER objects --- backend/s3/s3.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/s3/s3.go b/backend/s3/s3.go index d8ba92724..89ac51b3d 100644 --- a/backend/s3/s3.go +++ b/backend/s3/s3.go @@ -3338,6 +3338,10 @@ func (f *Fs) Command(ctx context.Context, name string, arg []string, opt map[str st.Status = "Not an S3 object" return } + if o.storageClass != "GLACIER" && o.storageClass != "DEEP_ARCHIVE" { + st.Status = "Not GLACIER or DEEP_ARCHIVE storage class" + return + } bucket, bucketPath := o.split() reqCopy := req reqCopy.Bucket = &bucket