From c63d4e83f9a375c016e2b2c9d01da61a078a16e3 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Wed, 29 Oct 2025 20:20:40 +0800 Subject: [PATCH] Use OperatingSystem replace RuntimeInformation --- v2rayN/ServiceLib/Common/Utils.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/v2rayN/ServiceLib/Common/Utils.cs b/v2rayN/ServiceLib/Common/Utils.cs index 13e550f0..7f842ddf 100644 --- a/v2rayN/ServiceLib/Common/Utils.cs +++ b/v2rayN/ServiceLib/Common/Utils.cs @@ -963,13 +963,13 @@ public class Utils #region Platform - public static bool IsWindows() => RuntimeInformation.IsOSPlatform(OSPlatform.Windows); + public static bool IsWindows() => OperatingSystem.IsWindows(); - public static bool IsLinux() => RuntimeInformation.IsOSPlatform(OSPlatform.Linux); + public static bool IsLinux() => OperatingSystem.IsLinux(); - public static bool IsOSX() => RuntimeInformation.IsOSPlatform(OSPlatform.OSX); + public static bool IsOSX() => OperatingSystem.IsMacOS(); - public static bool IsNonWindows() => !RuntimeInformation.IsOSPlatform(OSPlatform.Windows); + public static bool IsNonWindows() => !OperatingSystem.IsWindows(); public static string GetExeName(string name) {