Optimize deployment of staged files

This commit is contained in:
kayomn 2022-12-25 18:57:28 +00:00
parent 91c460c2f4
commit 8fcf4f7f85
1 changed files with 3 additions and 7 deletions

View File

@ -305,14 +305,10 @@ 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 {
return linkError
if !(os.IsNotExist(linkError)) {
return linkError
}
}
return nil