From 466698f096931b4d01191af71acb7420dbefcca3 Mon Sep 17 00:00:00 2001 From: Keepers Date: Wed, 14 Jun 2023 10:09:44 -0600 Subject: [PATCH] fix restore func misnaming in onedrive (#3616) #### Does this PR need a docs update or release note? - [x] :no_entry: No #### Type of change - [x] :broom: Tech Debt/Cleanup #### Issue(s) * #1996 --- src/internal/m365/onedrive/restore.go | 10 +++++----- src/internal/m365/restore.go | 2 +- src/internal/m365/sharepoint/restore.go | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/internal/m365/onedrive/restore.go b/src/internal/m365/onedrive/restore.go index c1416a0a3..da3f83d92 100644 --- a/src/internal/m365/onedrive/restore.go +++ b/src/internal/m365/onedrive/restore.go @@ -59,8 +59,8 @@ func NewRestoreCaches() *restoreCaches { } } -// RestoreCollections will restore the specified data collections into OneDrive -func RestoreCollections( +// ConsumeRestoreCollections will restore the specified data collections into OneDrive +func ConsumeRestoreCollections( ctx context.Context, rh RestoreHandler, backupVersion int, @@ -102,7 +102,7 @@ func RestoreCollections( "full_path", dc.FullPath()) ) - metrics, err = ProduceRestoreCollection( + metrics, err = RestoreCollection( ictx, rh, backupVersion, @@ -133,12 +133,12 @@ func RestoreCollections( return status, el.Failure() } -// ProduceRestoreCollection handles restoration of an individual collection. +// RestoreCollection handles restoration of an individual collection. // returns: // - the collection's item and byte count metrics // - the updated metadata map that include metadata for folders in this collection // - error, if any besides recoverable -func ProduceRestoreCollection( +func RestoreCollection( ctx context.Context, rh RestoreHandler, backupVersion int, diff --git a/src/internal/m365/restore.go b/src/internal/m365/restore.go index f04d3296c..07d4cd968 100644 --- a/src/internal/m365/restore.go +++ b/src/internal/m365/restore.go @@ -45,7 +45,7 @@ func (ctrl *Controller) ConsumeRestoreCollections( case selectors.ServiceExchange: status, err = exchange.ConsumeRestoreCollections(ctx, ctrl.AC, restoreCfg, dcs, deets, errs) case selectors.ServiceOneDrive: - status, err = onedrive.RestoreCollections( + status, err = onedrive.ConsumeRestoreCollections( ctx, onedrive.NewRestoreHandler(ctrl.AC), backupVersion, diff --git a/src/internal/m365/sharepoint/restore.go b/src/internal/m365/sharepoint/restore.go index 504f9a06a..7076d4de9 100644 --- a/src/internal/m365/sharepoint/restore.go +++ b/src/internal/m365/sharepoint/restore.go @@ -65,7 +65,7 @@ func ConsumeRestoreCollections( switch dc.FullPath().Category() { case path.LibrariesCategory: - metrics, err = onedrive.ProduceRestoreCollection( + metrics, err = onedrive.RestoreCollection( ictx, libraryRestoreHandler{ac.Drives()}, backupVersion,