mirror of
https://github.com/rclone/rclone.git
synced 2024-11-25 09:41:44 +08:00
s3: fix nil pointer reference if no metadata returned for object
Fixes #3651 Fixes #3652
This commit is contained in:
parent
a3a5857874
commit
ab895390f4
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user