1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

Compare commits

...

1 Commits

Author SHA1 Message Date
Nick Craig-Wood
b7c4d1f8f6 googlephotos: fix crash with --gphotos-batch-mode async
Before this change the async batch mode would return a nil info and we
attempted to use it and crashed.

The whole idea of async mode is that we don't wait for the response so
this patch ignores the empty info.

Fixes #8233
2025-05-27 15:36:55 +01:00

View File

@@ -1193,7 +1193,12 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op
return fmt.Errorf("failed to commit batch: %w", err)
}
o.setMetaData(info)
// Store the info back into the Object
// info == nil will only happen if we are uploading async batches
// we don't have anything sensible to write into the info then.
if info != nil {
o.setMetaData(info)
}
// Add upload to internal storage
if pattern.isUpload {