From ee20c571b3079b77382cbeae537b37a744b1b469 Mon Sep 17 00:00:00 2001 From: Vitek Karas Date: Tue, 6 Oct 2020 06:43:57 -0700 Subject: [PATCH] Improve detection of unsupported OS in resource updater (#43080) Per https://github.com/dotnet/runtime/pull/43058#discussion_r499896492 --- src/installer/managed/Microsoft.NET.HostModel/ResourceUpdater.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/installer/managed/Microsoft.NET.HostModel/ResourceUpdater.cs b/src/installer/managed/Microsoft.NET.HostModel/ResourceUpdater.cs index 9746b40..af71bfe 100644 --- a/src/installer/managed/Microsoft.NET.HostModel/ResourceUpdater.cs +++ b/src/installer/managed/Microsoft.NET.HostModel/ResourceUpdater.cs @@ -190,8 +190,7 @@ namespace Microsoft.NET.HostModel { int lastWin32Error = Marshal.GetLastWin32Error(); - if ((handle.IsInvalid && lastWin32Error == 0) || - lastWin32Error == Kernel32.ERROR_CALL_NOT_IMPLEMENTED) + if (handle.IsInvalid && (lastWin32Error == 0 || lastWin32Error == Kernel32.ERROR_CALL_NOT_IMPLEMENTED)) { return false; } -- 2.7.4