googlephotos: fix nil pointer crash on upload - fixes #8233

This commit is contained in:
Nick Craig-Wood 2024-12-13 15:12:38 +00:00
parent b8835fe7b4
commit 51d162e583

View File

@ -1168,7 +1168,7 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op
errors := make([]error, 1) errors := make([]error, 1)
results := make([]*api.MediaItem, 1) results := make([]*api.MediaItem, 1)
err = o.fs.commitBatch(ctx, []uploadedItem{uploaded}, results, errors) err = o.fs.commitBatch(ctx, []uploadedItem{uploaded}, results, errors)
if err != nil { if err == nil {
err = errors[0] err = errors[0]
info = results[0] info = results[0]
} }