net/dns: resolveConfExists reading the wrong error

Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
pull/2694/head
David Crawshaw 2021-06-25 09:51:49 -07:00 committed by Brad Fitzpatrick
parent c1aa5a2e33
commit 0ac2130590
1 changed files with 2 additions and 1 deletions

View File

@ -216,7 +216,8 @@ func (m directManager) restoreBackup() error {
if err != nil {
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
}
resolvConfExists := !os.IsNotExist(err)