Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

s3: Error message for objects in glacier

Jan Varhoc22be38747b1
diff --git a/s3/s3.go b/s3/s3.go
index 0ea6fe4c3..3fea79f6f 100644
--- a/s3/s3.go
+++ b/s3/s3.go
@@ -949,6 +949,11 @@ func (o *Object) Open(options ...fs.OpenOption) (in io.ReadCloser, err error) {
}
}
resp, err := o.fs.c.GetObject(&req)
+ if err, ok := err.(awserr.RequestFailure); ok {
+ if err.Code() == "InvalidObjectState" {
+ return nil, errors.Errorf("Object in GLACIER, restore first: %v", key)
+ }
+ }
if err != nil {
return nil, err
}