Improve detection of unsupported OS in resource updater (#43080)
authorVitek Karas <vitek.karas@microsoft.com>
Tue, 6 Oct 2020 13:43:57 +0000 (06:43 -0700)
committerGitHub <noreply@github.com>
Tue, 6 Oct 2020 13:43:57 +0000 (06:43 -0700)
Per https://github.com/dotnet/runtime/pull/43058#discussion_r499896492

src/installer/managed/Microsoft.NET.HostModel/ResourceUpdater.cs

index 9746b40..af71bfe 100644 (file)
@@ -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;
                     }