Skip to content

Commit

Permalink
Update commands.go
Browse files Browse the repository at this point in the history
  • Loading branch information
bitcodr committed Aug 2, 2020
1 parent 1d3c051 commit 8840fb5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/fscrypt/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,10 @@ func addProtectorAction(c *cli.Context) error {
return newExitError(c, err)
}
// Sanity check before unlocking everything
if err := policy.AddProtector(protector); err != nil && errors.Cause(err) != actions.ErrLocked {
if err := policy.AddProtector(protector); errors.Cause(err) != actions.ErrLocked {
if err == nil {
err = errors.New("policy and protector are not locked!")
}
return newExitError(c, err)
}

Expand Down

0 comments on commit 8840fb5

Please sign in to comment.