From a8e88e74ccb71f3bbeb480782e310e2add9900ef Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Wed, 8 Feb 2023 09:13:55 -0800 Subject: [PATCH] lib/backup/azremote: fix after upgrading github.com/Azure/azure-sdk-for-go/sdk/storage/azblob from v0.6.1 to v1.0.0 --- lib/backup/azremote/azblob.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/backup/azremote/azblob.go b/lib/backup/azremote/azblob.go index c248d122d..22f9649d4 100644 --- a/lib/backup/azremote/azblob.go +++ b/lib/backup/azremote/azblob.go @@ -173,7 +173,11 @@ func (fs *FS) CopyPart(srcFS common.OriginFS, p common.Part) error { Write: true, } - t, err := sbc.GetSASURL(ssCopyPermission, time.Now().Add(-10*time.Minute), time.Now().Add(30*time.Minute)) + startTime := time.Now().Add(-10 * time.Minute) + o := &blob.GetSASURLOptions{ + StartTime: &startTime, + } + t, err := sbc.GetSASURL(ssCopyPermission, time.Now().Add(30*time.Minute), o) if err != nil { return fmt.Errorf("failed to generate SAS token of src %q: %w", p.Path, err) }