From c8b01a5530eadc4944dd42f57f5db5408e186cd7 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Thu, 4 May 2023 20:28:38 +0800 Subject: [PATCH] bug fixes --- v2rayN/v2rayN/Handler/CoreHandler.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/v2rayN/v2rayN/Handler/CoreHandler.cs b/v2rayN/v2rayN/Handler/CoreHandler.cs index 3f9f496a..5960980e 100644 --- a/v2rayN/v2rayN/Handler/CoreHandler.cs +++ b/v2rayN/v2rayN/Handler/CoreHandler.cs @@ -165,7 +165,8 @@ namespace v2rayN.Handler } var coreInfo = LazyConfig.Instance.GetCoreInfo(coreType); - var proc = RunProcess(node, coreInfo, "", ShowMsg); + var displayLog = node.configType != EConfigType.Custom || node.displayLog; + var proc = RunProcess(node, coreInfo, "", displayLog, ShowMsg); if (proc is null) { return; @@ -188,7 +189,7 @@ namespace v2rayN.Handler if (CoreConfigHandler.GenerateClientConfig(itemSocks, fileName2, out string msg2, out string configStr) == 0) { var coreInfo2 = LazyConfig.Instance.GetCoreInfo(ECoreType.sing_box); - var proc2 = RunProcess(node, coreInfo2, $" -c {Global.corePreConfigFileName}", ShowMsg); + var proc2 = RunProcess(node, coreInfo2, $" -c {Global.corePreConfigFileName}", true, ShowMsg); if (proc2 is not null) { _processPre = proc2; @@ -271,7 +272,7 @@ namespace v2rayN.Handler #region Process - private Process? RunProcess(ProfileItem node, CoreInfo coreInfo, string configPath, Action update) + private Process? RunProcess(ProfileItem node, CoreInfo coreInfo, string configPath, bool displayLog, Action update) { try { @@ -280,7 +281,6 @@ namespace v2rayN.Handler { return null; } - var displayLog = node.configType != EConfigType.Custom || node.displayLog; Process proc = new() { StartInfo = new ProcessStartInfo