Fix double error-check in game registration logic
This commit is contained in:
parent
43e9791ffe
commit
4d0b24c46a
|
@ -117,10 +117,6 @@ func CreateGame(gameName string, gameDataPath string) error {
|
|||
}
|
||||
|
||||
if iniFile, openError := os.Open(gamesIniPath); openError == nil {
|
||||
if (openError != nil) && !(os.IsNotExist(openError)) {
|
||||
return openError
|
||||
}
|
||||
|
||||
defer func() {
|
||||
if closeError := iniFile.Close(); closeError != nil {
|
||||
panic(closeError)
|
||||
|
|
Loading…
Reference in New Issue