net/dns: resolveConfExists reading the wrong error
@@ -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)
