From 589ccc6e060eb90c25fa388db5abf47b543df23d Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Fri, 28 Aug 2026 14:24:12 +0800 Subject: [PATCH] Bug fix https://github.com/2dust/v2rayN/issues/10043 --- v2rayN/ServiceLib/Handler/ConfigHandler.cs | 28 ++++++++++------------ 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/v2rayN/ServiceLib/Handler/ConfigHandler.cs b/v2rayN/ServiceLib/Handler/ConfigHandler.cs index be64ca8b..39dc1e2a 100644 --- a/v2rayN/ServiceLib/Handler/ConfigHandler.cs +++ b/v2rayN/ServiceLib/Handler/ConfigHandler.cs @@ -1753,15 +1753,13 @@ public static class ConfigHandler { lstProfiles = SingboxFmt.ResolveToCustomOutbound(strData, subRemarks); } - if (lstProfiles.Count == 0) + if (lstProfiles.Count > 0) { - return -1; - } - - var count = await AddBatchCustomServers(config, lstProfiles, subid, isSub); - if (count > 0) - { - return count; + var count = await AddBatchCustomServers(config, lstProfiles, subid, isSub); + if (count > 0) + { + return count; + } } if (HtmlPageFmt.IsHtmlPage(strData)) @@ -1801,15 +1799,13 @@ public static class ConfigHandler _ => null, }; - if ((lstProfiles?.Count ?? 0) == 0) + if (lstProfiles?.Count > 0) { - return -1; - } - - var count = await AddBatchCustomServers(config, lstProfiles, subid, isSub); - if (count > 0) - { - return count; + var count = await AddBatchCustomServers(config, lstProfiles, subid, isSub); + if (count > 0) + { + return count; + } } return await SaveCustomRawFileServer(config, strData, subid, isSub, subItem, customCoreType);