Skip to content

Commit

Permalink
ipn: search for ErrStateNotExist with errors.Is
Browse files Browse the repository at this point in the history
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
  • Loading branch information
crawshaw committed Mar 12, 2020
1 parent 40c6f95 commit 57f2206
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ipn/local.go
Expand Up @@ -422,7 +422,7 @@ func (b *LocalBackend) loadStateLocked(key StateKey, prefs *Prefs, legacyPath st
b.logf("Using backend prefs")
bs, err := b.store.ReadState(key)
if err != nil {
if err == ErrStateNotExist {
if errors.Is(err, ErrStateNotExist) {
if legacyPath != "" {
b.prefs, err = LoadPrefs(legacyPath, true)
if err != nil {
Expand Down

0 comments on commit 57f2206

Please sign in to comment.