Config: Write UserConfig.xml if it does not exist

This commit is contained in:
Jonathan Jenne 2021-07-12 10:44:59 +02:00
parent 45de1d6122
commit fddeccd52b

View File

@ -278,8 +278,6 @@ Public Class ConfigManager(Of T)
' if user config exists ' if user config exists
If Not IsNothing(oUserConfig) Then If Not IsNothing(oUserConfig) Then
Dim oExcludedAttributes As New List(Of Type)
' Copy values from user config to final config ' Copy values from user config to final config
If _WriteAllValuesToUserConfig Then If _WriteAllValuesToUserConfig Then
CopyValues(oUserConfig, Config, New List(Of Type)) CopyValues(oUserConfig, Config, New List(Of Type))
@ -294,7 +292,8 @@ Public Class ConfigManager(Of T)
_Logger.Warn("User config could not be loaded!") _Logger.Warn("User config could not be loaded!")
End Try End Try
Else Else
_Logger.Debug("User config does not exist.") _Logger.Debug("User config does not exist. Default config will be created")
WriteToFile(Config, _UserConfigPath, False)
End If End If
Return Config Return Config