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

fixed delete duplicate problem #108

Merged
merged 2 commits into from
Nov 11, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
5 changes: 2 additions & 3 deletions server/gus.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package server
import (
"github.com/go-ini/ini"
"github.com/wailsapp/wails/v2/pkg/runtime"

JensvandeWiel marked this conversation as resolved.
Show resolved Hide resolved
"os"
"path/filepath"
)
Expand Down Expand Up @@ -428,9 +429,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,
}
Loading