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
1 changed files with 3 additions and 0 deletions
|
@ -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 a new issue