add more cleanup #25
This commit is contained in:
parent
a057c65a02
commit
473cfd3ced
@ -426,7 +426,7 @@ func (a *Agent) GetUninstallExe() string {
|
|||||||
|
|
||||||
func (a *Agent) CleanupAgentUpdates() {
|
func (a *Agent) CleanupAgentUpdates() {
|
||||||
// TODO remove a.ProgramDir, updates are now in winTempDir
|
// 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 {
|
for _, dir := range dirs {
|
||||||
err := os.Chdir(dir)
|
err := os.Chdir(dir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -435,7 +435,7 @@ func (a *Agent) CleanupAgentUpdates() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO winagent-v* is deprecated
|
// 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 {
|
for _, glob := range globs {
|
||||||
files, err := filepath.Glob(glob)
|
files, err := filepath.Glob(glob)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user