Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

googlephotos: fix nil pointer exception when batch failed

Nick Craig-Wooda3d19942bd22
diff --git a/backend/googlephotos/googlephotos.go b/backend/googlephotos/googlephotos.go
index df031b606..0b0290d3a 100644
--- a/backend/googlephotos/googlephotos.go
+++ b/backend/googlephotos/googlephotos.go
@@ -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)