File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed 
Rubberduck.SettingsProvider Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -51,23 +51,21 @@ protected static T FailedLoadReturnValue()
5151
5252        protected  static   XDocument  GetConfigurationDoc ( string  file ) 
5353        { 
54-             if  ( ! File . Exists ( file ) ) 
55-             { 
56-                 return  new  XDocument ( ) ; 
57-             } 
58- 
5954            XDocument  output ; 
60-             try 
55+             if   ( File . Exists ( file ) ) 
6156            { 
62-                 output  =  XDocument . Load ( file ) ; 
63-                 if  ( output . Descendants ( ) . FirstOrDefault ( e =>  e . Name . LocalName . Equals ( RootElement ) )  !=  null ) 
57+                 try 
6458                { 
65-                     return  output ; 
59+                     output  =  XDocument . Load ( file ) ; 
60+                     if  ( output . Descendants ( ) . FirstOrDefault ( e =>  e . Name . LocalName . Equals ( RootElement ) )  !=  null ) 
61+                     { 
62+                         return  output ; 
63+                     } 
64+                 } 
65+                 catch 
66+                 { 
67+                     // this is fine - we'll just return an empty XDocument. 
6668                } 
67-             } 
68-             catch 
69-             { 
70-                 // this is fine - we'll just return an empty XDocument. 
7169            } 
7270
7371            output  =  new  XDocument ( ) ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments