From 89f0475e2634e27e278d18aa91ebcf5195e469a3 Mon Sep 17 00:00:00 2001 From: Firejox Date: Wed, 12 Oct 2022 12:34:42 +0800 Subject: [PATCH] Use Environment.SystemDirectory to prevent the wsl path fixed problem --- winsocat/Wsl.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsocat/Wsl.cs b/winsocat/Wsl.cs index ecb37c5..dfa742b 100644 --- a/winsocat/Wsl.cs +++ b/winsocat/Wsl.cs @@ -2,7 +2,7 @@ public class WslPiperInfo { - private static readonly bool WslCheck = File.Exists(@"C:\Windows\System32\wsl.exe"); + private static readonly bool WslCheck = File.Exists(Path.Join(Environment.SystemDirectory, "wsl.exe")); private readonly string _command; public string Command => _command;