From 8fcf4f7f857ad789688f9e63e3c052737b6e6b29 Mon Sep 17 00:00:00 2001 From: kayomn Date: Sun, 25 Dec 2022 18:57:28 +0000 Subject: [PATCH] Optimize deployment of staged files --- manager.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/manager.go b/manager.go index 2c1845c..0b5dbad 100644 --- a/manager.go +++ b/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