Fix double error-check in game registration logic

This commit is contained in:
kayomn 2023-01-02 13:53:59 +00:00
parent 43e9791ffe
commit 4d0b24c46a
1 changed files with 0 additions and 4 deletions

View File

@ -117,10 +117,6 @@ func CreateGame(gameName string, gameDataPath string) error {
} }
if iniFile, openError := os.Open(gamesIniPath); openError == nil { if iniFile, openError := os.Open(gamesIniPath); openError == nil {
if (openError != nil) && !(os.IsNotExist(openError)) {
return openError
}
defer func() { defer func() {
if closeError := iniFile.Close(); closeError != nil { if closeError := iniFile.Close(); closeError != nil {
panic(closeError) panic(closeError)