Compare commits

...

2 Commits

1 changed files with 7 additions and 7 deletions

View File

@ -305,15 +305,11 @@ func DeployGameMods(gameName string, modArchivePaths []string) error {
} }
} }
if removeError := os.Remove(deployFilePath); removeError != nil {
if !(os.IsNotExist(removeError)) {
return removeError
}
}
if linkError := os.Link(path, deployFilePath); linkError != nil { if linkError := os.Link(path, deployFilePath); linkError != nil {
if !(os.IsNotExist(linkError)) {
return linkError return linkError
} }
}
return nil return nil
}); walkError != nil { }); walkError != nil {
@ -326,6 +322,10 @@ func DeployGameMods(gameName string, modArchivePaths []string) error {
} }
func RemoveGame(gameName string) error { func RemoveGame(gameName string) error {
if cleanError := CleanGameMods(gameName); cleanError != nil {
return cleanError
}
var gameDataPaths = make(map[string]string) var gameDataPaths = make(map[string]string)
if iniFile, openError := os.Open(gamesIniPath); openError == nil { if iniFile, openError := os.Open(gamesIniPath); openError == nil {