Optimize deployment of staged files
This commit is contained in:
parent
91c460c2f4
commit
8fcf4f7f85
10
manager.go
10
manager.go
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue