From 32ffd43fe32844ecb8ead79197748faa4c27e1ca Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Tue, 30 Jul 2024 16:06:43 +0800 Subject: [PATCH] Bug fix https://github.com/2dust/v2rayN/issues/5425 --- .../v2rayN/Handler/CoreConfig/CoreConfigSingbox.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/v2rayN/v2rayN/Handler/CoreConfig/CoreConfigSingbox.cs b/v2rayN/v2rayN/Handler/CoreConfig/CoreConfigSingbox.cs index d43a07f09f..447db907b8 100644 --- a/v2rayN/v2rayN/Handler/CoreConfig/CoreConfigSingbox.cs +++ b/v2rayN/v2rayN/Handler/CoreConfig/CoreConfigSingbox.cs @@ -393,12 +393,15 @@ public int GenerateClientCustomConfig(ProfileItem node, string? fileName, out st var singboxConfig = JsonUtils.Deserialize(txtFile); if (singboxConfig == null) { - msg = ResUI.FailedConversionConfiguration; - return -1; + //msg = ResUI.FailedConversionConfiguration; + //return -1; + File.Copy(addressFileName, fileName); + } + else + { + GenExperimental(singboxConfig); + JsonUtils.ToFile(singboxConfig, fileName, false); } - - GenExperimental(singboxConfig); - JsonUtils.ToFile(singboxConfig, fileName, false); //check again if (!File.Exists(fileName))