From 39d41b15039c27bd3306a61cb85c1b78b05d7fd6 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Wed, 4 Oct 2023 09:37:47 +0100 Subject: [PATCH] Fix buggy patterns. --- Interop/DetectOS.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Interop/DetectOS.cs b/Interop/DetectOS.cs index 3ecd912..9aea35c 100644 --- a/Interop/DetectOS.cs +++ b/Interop/DetectOS.cs @@ -265,7 +265,8 @@ public static class DetectOS goto default; case PlatformID.Win32NT: // From Windows 8.1 the reported version is simply falsified... - if(Environment.OSVersion.Version.Major is 6 and >= 2 or > 6) + if(Environment.OSVersion.Version.Major == 6 && Environment.OSVersion.Version.Minor >= 2 || + Environment.OSVersion.Version.Major > 6) { return FileVersionInfo. GetVersionInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System),