diff --git a/v2rayN/AmazTool/Utils.cs b/v2rayN/AmazTool/Utils.cs index 1d9fdb33..df13ecf6 100644 --- a/v2rayN/AmazTool/Utils.cs +++ b/v2rayN/AmazTool/Utils.cs @@ -1,7 +1,4 @@ -using System; using System.Diagnostics; -using System.IO; -using System.Threading; namespace AmazTool; @@ -51,31 +48,4 @@ internal class Utils Thread.Sleep(1000); } } - - public static bool IsPackagedInstall() - { - try - { - if (OperatingSystem.IsWindows() || OperatingSystem.IsMacOS()) - return false; - - if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("APPIMAGE"))) - return true; - - var sp = StartupPath()?.Replace('\\', '/'); - if (!string.IsNullOrEmpty(sp) && sp.StartsWith("/opt/v2rayN", StringComparison.Ordinal)) - return true; - - var procPath = Environment.ProcessPath; - var procDir = string.IsNullOrEmpty(procPath) - ? "" - : Path.GetDirectoryName(procPath)?.Replace('\\', '/'); - if (!string.IsNullOrEmpty(procDir) && procDir.StartsWith("/opt/v2rayN", StringComparison.Ordinal)) - return true; - } - catch - { - } - return false; - } }