File tree Expand file tree Collapse file tree
src/c#/GeneralUpdate.Common/Shared/Object Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -135,9 +135,24 @@ private static ConfiginfoBuilder LoadFromConfigFile()
135135
136136 return builder ;
137137 }
138+ catch ( System . Text . Json . JsonException )
139+ {
140+ // Invalid JSON format, fall back to parameters
141+ return null ;
142+ }
143+ catch ( IOException )
144+ {
145+ // File read error, fall back to parameters
146+ return null ;
147+ }
148+ catch ( UnauthorizedAccessException )
149+ {
150+ // Permission denied, fall back to parameters
151+ return null ;
152+ }
138153 catch
139154 {
140- // If there's any error reading or parsing the file, return null
155+ // Any other unexpected error, fall back to parameters
141156 return null ;
142157 }
143158 }
@@ -184,6 +199,8 @@ private void InitializePlatformDefaults()
184199 _skipDirectorys = new List < string > ( ) ;
185200
186201 // Set default InstallPath to current program running directory
202+ // This is set here to ensure the builder has a consistent default
203+ // even though BaseConfigInfo also has this default via property initializer
187204 _installPath = AppDomain . CurrentDomain . BaseDirectory ;
188205 }
189206
You can’t perform that action at this time.
0 commit comments