diff options
| author | Eric Biggers <ebiggers@google.com> | 2022-04-08 23:16:59 -0700 |
|---|---|---|
| committer | Eric Biggers <ebiggers@google.com> | 2022-04-08 23:38:01 -0700 |
| commit | ca7a84b8aea203025acbda193f78ea98946236b5 (patch) | |
| tree | 2b9e781db960662c570b5b35f840369130fc87a7 /actions/recovery.go | |
| parent | a224e769a478cc446c05dbfd5eb7e32d31933172 (diff) | |
Switch to google.golang.org/protobuf/proto
github.com/golang/protobuf/proto has been deprecated in favor of
google.golang.org/protobuf/proto, so migrate to the non-deprecated one.
Diffstat (limited to 'actions/recovery.go')
| -rw-r--r-- | actions/recovery.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/actions/recovery.go b/actions/recovery.go index 8a769cc..2bb8a23 100644 --- a/actions/recovery.go +++ b/actions/recovery.go @@ -23,6 +23,8 @@ import ( "os" "strconv" + "google.golang.org/protobuf/proto" + "github.com/google/fscrypt/crypto" "github.com/google/fscrypt/metadata" "github.com/google/fscrypt/util" @@ -31,10 +33,10 @@ import ( // modifiedContextWithSource returns a copy of ctx with the protector source // replaced by source. func modifiedContextWithSource(ctx *Context, source metadata.SourceType) *Context { - modifiedConfig := *ctx.Config + modifiedConfig := proto.Clone(ctx.Config).(*metadata.Config) modifiedConfig.Source = source modifiedCtx := *ctx - modifiedCtx.Config = &modifiedConfig + modifiedCtx.Config = modifiedConfig return &modifiedCtx } |