mirror of https://github.com/2dust/v2rayN
up addr
parent
ad406c3682
commit
7d31c2e472
|
@ -515,11 +515,11 @@ namespace v2rayN.Handler
|
|||
{
|
||||
string newFileName = string.Empty;
|
||||
newFileName = string.Format("{0}.json", Utils.GetGUID());
|
||||
newFileName = Path.Combine(Utils.GetTempPath(), newFileName);
|
||||
//newFileName = Path.Combine(Utils.GetTempPath(), newFileName);
|
||||
|
||||
try
|
||||
{
|
||||
File.Copy(fileName, newFileName);
|
||||
File.Copy(fileName, Path.Combine(Utils.GetTempPath(), newFileName));
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
|
@ -688,11 +688,21 @@ namespace v2rayN.Handler
|
|||
return -1;
|
||||
}
|
||||
|
||||
string addressFileName = config.address();
|
||||
if (File.Exists(fileName))
|
||||
{
|
||||
File.Delete(fileName);
|
||||
}
|
||||
|
||||
string addressFileName = config.address();
|
||||
if (!File.Exists(addressFileName))
|
||||
{
|
||||
addressFileName = Path.Combine(Utils.GetTempPath(), addressFileName);
|
||||
}
|
||||
if (!File.Exists(addressFileName))
|
||||
{
|
||||
msg = UIRes.I18N("FailedGenDefaultConfiguration");
|
||||
return -1;
|
||||
}
|
||||
File.Copy(addressFileName, fileName);
|
||||
|
||||
msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), config.getSummary());
|
||||
|
|
Loading…
Reference in New Issue