From 473cfd3ced4c6a1d03a41fc33974dc46ccb7b827 Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Sun, 6 Nov 2022 22:20:49 -0800 Subject: [PATCH] add more cleanup #25 --- agent/agent.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agent/agent.go b/agent/agent.go index 16d1c1c..c9b9b04 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -426,7 +426,7 @@ func (a *Agent) GetUninstallExe() string { func (a *Agent) CleanupAgentUpdates() { // TODO remove a.ProgramDir, updates are now in winTempDir - dirs := [2]string{winTempDir, a.ProgramDir} + dirs := [3]string{winTempDir, os.Getenv("TMP"), a.ProgramDir} for _, dir := range dirs { err := os.Chdir(dir) if err != nil { @@ -435,7 +435,7 @@ func (a *Agent) CleanupAgentUpdates() { } // TODO winagent-v* is deprecated - globs := [2]string{"tacticalagent-v*", "winagent-v*"} + globs := [3]string{"tacticalagent-v*", "is-*.tmp", "winagent-v*"} for _, glob := range globs { files, err := filepath.Glob(glob) if err == nil {