net/dns: resolveConfExists reading the wrong error

Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
pull/2694/head
David Crawshaw 3 years ago committed by Brad Fitzpatrick
parent c1aa5a2e33
commit 0ac2130590

@ -216,7 +216,8 @@ func (m directManager) restoreBackup() error {
if err != nil { if err != nil {
return err return err
} }
if _, err := m.fs.Stat(resolvConf); err != nil && !os.IsNotExist(err) { _, err = m.fs.Stat(resolvConf)
if err != nil && !os.IsNotExist(err) {
return err return err
} }
resolvConfExists := !os.IsNotExist(err) resolvConfExists := !os.IsNotExist(err)

Loading…
Cancel
Save