ipn: search for ErrStateNotExist with errors.Is

Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
crawshaw/derptimeout
David Crawshaw 5 years ago
parent 40c6f952c5
commit 57f220656c

@ -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 {

Loading…
Cancel
Save