diff --git a/server/game.go b/server/game.go index 4fa0910..1f69b77 100644 --- a/server/game.go +++ b/server/game.go @@ -277,9 +277,7 @@ func (s *Server) SaveGameIni() error { return err } - gIni := ini.Empty() - - gIni, err := ini.Load(filepath.Join(s.ServerPath, "ShooterGame\\Saved\\Config\\WindowsServer\\Game.ini")) + gIni, err := ini.LoadSources(iniOpts, filepath.Join(s.ServerPath, "ShooterGame\\Saved\\Config\\WindowsServer\\Game.ini")) if err != nil { return err } diff --git a/server/gus.go b/server/gus.go index 9fde82d..2d07628 100644 --- a/server/gus.go +++ b/server/gus.go @@ -428,9 +428,7 @@ func (s *Server) SaveGameUserSettingsIni() error { return err } - gusIni := ini.Empty() - - gusIni, err := ini.Load(filepath.Join(s.ServerPath, "ShooterGame\\Saved\\Config\\WindowsServer\\GameUserSettings.ini")) + gusIni, err := ini.LoadSources(iniOpts, filepath.Join(s.ServerPath, "ShooterGame\\Saved\\Config\\WindowsServer\\GameUserSettings.ini")) if err != nil { return err } diff --git a/server/helpers.go b/server/helpers.go index b35d923..2061e07 100644 --- a/server/helpers.go +++ b/server/helpers.go @@ -3,6 +3,7 @@ package server import ( "fmt" "github.com/JensvandeWiel/ArkAscendedServerManager/helpers" + "github.com/go-ini/ini" "github.com/sethvargo/go-password/password" "github.com/wailsapp/wails/v2/pkg/runtime" "io" @@ -217,3 +218,8 @@ func (c *ServerController) GetServerDir() string { } //endregion + +var iniOpts = ini.LoadOptions{ + AllowShadows: true, + AllowDuplicateShadowValues: true, +}