Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Commit

Permalink
fixed delete duplicate problem (#108)
Browse files Browse the repository at this point in the history
* fixed delete duplicate problem

* Update gus.go
  • Loading branch information
JensvandeWiel authored Nov 11, 2023
1 parent 7a9762e commit c2ad30b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 1 addition & 3 deletions server/game.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 1 addition & 3 deletions server/gus.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
6 changes: 6 additions & 0 deletions server/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -217,3 +218,8 @@ func (c *ServerController) GetServerDir() string {
}

//endregion

var iniOpts = ini.LoadOptions{
AllowShadows: true,
AllowDuplicateShadowValues: true,
}

0 comments on commit c2ad30b

Please sign in to comment.