diff --git a/backend/s3/s3.go b/backend/s3/s3.go index 28299066b..d19bd70fe 100644 --- a/backend/s3/s3.go +++ b/backend/s3/s3.go @@ -1872,6 +1872,9 @@ func (o *Object) readMetaData(ctx context.Context) (err error) { o.etag = aws.StringValue(resp.ETag) o.bytes = size o.meta = resp.Metadata + if o.meta == nil { + o.meta = map[string]*string{} + } o.storageClass = aws.StringValue(resp.StorageClass) if resp.LastModified == nil { fs.Logf(o, "Failed to read last modified from HEAD: %v", err)