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) {