pull/5550/head
2dust 4 months ago
parent bb4d3997ad
commit 8023eb74c9

@ -389,12 +389,12 @@ namespace v2rayN.Handler.CoreConfig
return -1; return -1;
} }
if (node.address == Global.CoreMultipleLoadConfigFileName)
{
var txtFile = File.ReadAllText(addressFileName); var txtFile = File.ReadAllText(addressFileName);
var singboxConfig = JsonUtils.Deserialize<SingboxConfig>(txtFile); var singboxConfig = JsonUtils.Deserialize<SingboxConfig>(txtFile);
if (singboxConfig == null) if (singboxConfig == null)
{ {
//msg = ResUI.FailedConversionConfiguration;
//return -1;
File.Copy(addressFileName, fileName); File.Copy(addressFileName, fileName);
} }
else else
@ -403,6 +403,11 @@ namespace v2rayN.Handler.CoreConfig
GenExperimental(singboxConfig); GenExperimental(singboxConfig);
JsonUtils.ToFile(singboxConfig, fileName, false); JsonUtils.ToFile(singboxConfig, fileName, false);
} }
}
else
{
File.Copy(addressFileName, fileName);
}
//check again //check again
if (!File.Exists(fileName)) if (!File.Exists(fileName))

Loading…
Cancel
Save