lib/backup/azremote: fix after upgrading github.com/Azure/azure-sdk-for-go/sdk/storage/azblob from v0.6.1 to v1.0.0

This commit is contained in:
Aliaksandr Valialkin 2023-02-08 09:13:55 -08:00
parent c7a4751c70
commit 146b3bd088
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1

View file

@ -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)
}