mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 10:54:48 +08:00
googlephotos: fix nil pointer exception when batch failed
This was a simple error check that was missing. Interestingly the errcheck linter did not spot this. See: https://forum.rclone.org/t/invalid-memory-address-or-nil-pointer-dereference-error-when-copy-to-google-photos/43634/
This commit is contained in:
parent
394195cfdf
commit
a3d19942bd
|
@ -1143,6 +1143,9 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op
|
|||
info = results[0]
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to commit batch: %w", err)
|
||||
}
|
||||
|
||||
o.setMetaData(info)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user