未验证 提交 f6baea2d 编写于 作者: R Radek Zikmund 提交者: GitHub

Fix filtered exceptions when checking for ip forwarding (#76383)

上级 062fb456
......@@ -52,8 +52,7 @@ private bool GetIsForwardingEnabled()
{
return StringParsingHelpers.ParseRawIntFile(paths[i]) == 1;
}
catch (IOException) { }
catch (UnauthorizedAccessException) { }
catch (NetworkInformationException ex) when (ex.InnerException is IOException or UnauthorizedAccessException) { }
}
return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册