remove stale inno temp files
This commit is contained in:
		@@ -13,6 +13,8 @@ package agent
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"fmt"
 | 
			
		||||
	"os"
 | 
			
		||||
	"path/filepath"
 | 
			
		||||
	"strings"
 | 
			
		||||
 | 
			
		||||
	rmm "github.com/amidaware/rmmagent/shared"
 | 
			
		||||
@@ -76,4 +78,15 @@ func (a *Agent) KillHungUpdates() {
 | 
			
		||||
			KillProc(int32(p.PID))
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	err = os.Chdir(a.ProgramDir)
 | 
			
		||||
	if err == nil {
 | 
			
		||||
		files, err := filepath.Glob("is-*.tmp")
 | 
			
		||||
		if err == nil {
 | 
			
		||||
			for _, f := range files {
 | 
			
		||||
				a.Logger.Debugln("KillHungUpdates() Removing file:", f)
 | 
			
		||||
				os.Remove(f)
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user