mirror of https://github.com/2dust/v2rayN
Improve clone custom configuration
parent
7eafae98d4
commit
8f5bb3591b
|
@ -152,7 +152,7 @@ namespace v2rayN.Forms
|
|||
return;
|
||||
}
|
||||
|
||||
address = Path.Combine(Utils.GetConfigPath(), address);
|
||||
address = Utils.GetConfigPath(address);
|
||||
Process.Start(address);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -284,7 +284,17 @@ namespace v2rayN.Handler
|
|||
vmessItem.indexId = string.Empty;
|
||||
vmessItem.remarks = string.Format("{0}-clone", item.remarks);
|
||||
|
||||
AddServerCommon(ref config, vmessItem);
|
||||
if (vmessItem.configType == EConfigType.Custom)
|
||||
{
|
||||
vmessItem.address = Utils.GetConfigPath(vmessItem.address);
|
||||
if (AddCustomServer(ref config, vmessItem, false) == 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
AddServerCommon(ref config, vmessItem);
|
||||
}
|
||||
}
|
||||
|
||||
ToJsonFile(config);
|
||||
|
@ -442,7 +452,7 @@ namespace v2rayN.Handler
|
|||
|
||||
try
|
||||
{
|
||||
File.Copy(fileName, Path.Combine(Utils.GetConfigPath(), newFileName));
|
||||
File.Copy(fileName, Utils.GetConfigPath(newFileName));
|
||||
if (blDelete)
|
||||
{
|
||||
File.Delete(fileName);
|
||||
|
|
|
@ -941,7 +941,7 @@ namespace v2rayN.Handler
|
|||
string addressFileName = node.address;
|
||||
if (!File.Exists(addressFileName))
|
||||
{
|
||||
addressFileName = Path.Combine(Utils.GetConfigPath(), addressFileName);
|
||||
addressFileName = Utils.GetConfigPath(addressFileName);
|
||||
}
|
||||
if (!File.Exists(addressFileName))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue