s3: backend restore command to skip non-GLACIER objects

This commit is contained in:
Vincent Murphy 2022-05-12 20:42:37 +01:00 committed by GitHub
parent a9d3283d97
commit 319ac225e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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