From b22c00424e044a10f54a365937b2877a4c7e2ef3 Mon Sep 17 00:00:00 2001 From: Danny Adams Date: Wed, 8 Mar 2023 08:50:00 -0500 Subject: [PATCH] Update to to cli/backup/sharepoint.go Bug Fix: FileCreated flags updated. Commment fixes. --- src/cli/backup/sharepoint.go | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/cli/backup/sharepoint.go b/src/cli/backup/sharepoint.go index 3c1cc25ab..fc32aa55c 100644 --- a/src/cli/backup/sharepoint.go +++ b/src/cli/backup/sharepoint.go @@ -2,6 +2,7 @@ package backup import ( "context" + "fmt" "github.com/hashicorp/go-multierror" "github.com/pkg/errors" @@ -55,10 +56,10 @@ const ( sharePointServiceCommandCreateExamples = `# Backup SharePoint data for corso backup create sharepoint --site -# Backup SharePoint for Alice and Bob -corso backup create sharepoint --site , +# Backup SharePoint for two different sites +corso backup create sharepoint --web-url , -# TODO: Site IDs may contain commas. We'll need to warn the site about escaping them. +# Site IDs may contain commas. Either use the web-url or escape the commas within the Site ID. # Backup all SharePoint data for all sites corso backup create sharepoint --site '*'` @@ -431,10 +432,10 @@ func detailsSharePointCmd(cmd *cobra.Command, args []string) error { LibraryPaths: libraryPaths, Sites: site, WebURLs: weburl, - FileCreatedAfter: fileCreatedAfter, - FileCreatedBefore: fileCreatedBefore, - FileModifiedAfter: fileModifiedAfter, - FileModifiedBefore: fileModifiedBefore, + FileCreatedAfter: utils.FileCreatedAfter, + FileCreatedBefore: utils.FileCreatedBefore, + FileModifiedAfter: utils.FileModifiedAfter, + FileModifiedBefore: utils.FileModifiedBefore, Populated: utils.GetPopulatedFlags(cmd), } @@ -474,6 +475,7 @@ func runDetailsSharePointCmd( skipReduce bool, ) (*details.Details, error) { if err := utils.ValidateSharePointRestoreFlags(backupID, opts); err != nil { + fmt.Println("Fail on validate") return nil, err }