mirror of
				https://github.com/2dust/v2rayN.git
				synced 2025-11-03 22:12:52 +00:00 
			
		
		
		
	up addr
This commit is contained in:
		
							parent
							
								
									ad406c3682
								
							
						
					
					
						commit
						7d31c2e472
					
				
					 2 changed files with 13 additions and 3 deletions
				
			
		| 
						 | 
					@ -515,11 +515,11 @@ namespace v2rayN.Handler
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            string newFileName = string.Empty;
 | 
					            string newFileName = string.Empty;
 | 
				
			||||||
            newFileName = string.Format("{0}.json", Utils.GetGUID());
 | 
					            newFileName = string.Format("{0}.json", Utils.GetGUID());
 | 
				
			||||||
            newFileName = Path.Combine(Utils.GetTempPath(), newFileName);
 | 
					            //newFileName = Path.Combine(Utils.GetTempPath(), newFileName);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            try
 | 
					            try
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                File.Copy(fileName, newFileName);
 | 
					                File.Copy(fileName, Path.Combine(Utils.GetTempPath(), newFileName));
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            catch
 | 
					            catch
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -688,11 +688,21 @@ namespace v2rayN.Handler
 | 
				
			||||||
                    return -1;
 | 
					                    return -1;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                string addressFileName = config.address();
 | 
					 | 
				
			||||||
                if (File.Exists(fileName))
 | 
					                if (File.Exists(fileName))
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    File.Delete(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);
 | 
					                File.Copy(addressFileName, fileName);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), config.getSummary());
 | 
					                msg = string.Format(UIRes.I18N("SuccessfulConfiguration"), config.getSummary());
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue