diff --git a/backend/s3/s3.go b/backend/s3/s3.go index 0ce6f14ed..c6201492c 100644 --- a/backend/s3/s3.go +++ b/backend/s3/s3.go @@ -2033,11 +2033,17 @@ func (o *Object) readMetaData(ctx context.Context) (err error) { if err != nil { if awsErr, ok := err.(awserr.RequestFailure); ok { if awsErr.StatusCode() == http.StatusNotFound { + // NotFound indicates bucket was OK + // NoSuchBucket would be returned if bucket was bad + if awsErr.Code() == "NotFound" { + o.fs.cache.MarkOK(bucket) + } return fs.ErrorObjectNotFound } } return err } + o.fs.cache.MarkOK(bucket) var size int64 // Ignore missing Content-Length assuming it is 0 // Some versions of ceph do this due their apache proxies