From 38770b92ae2abd5a40880dcd38099b4bfd218ea6 Mon Sep 17 00:00:00 2001 From: Jacob Weisz Date: Wed, 17 Jul 2024 02:48:12 -0500 Subject: [PATCH] Delete update archive after unpacking --- modUpdate.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/modUpdate.cs b/modUpdate.cs index e684ac4..d82da27 100644 --- a/modUpdate.cs +++ b/modUpdate.cs @@ -82,6 +82,7 @@ public static int UpdateAgent() string UpdateFile = "agent" + updateNeeded.ToString() + ".zip"; UpdateDownloadClient.DownloadFile(Properties.Settings.Default.Update_SourceURI + UpdateFile, Properties.Settings.Default.Scripts_FolderURI + UpdateFile); ZipFile.ExtractToDirectory(Properties.Settings.Default.Scripts_FolderURI + UpdateFile, Properties.Settings.Default.Scripts_FolderURI + "agenttemp"); + File.Delete(Properties.Settings.Default.Scripts_FolderURI + UpdateFile); File.Copy(Properties.Settings.Default.Scripts_FolderURI + @"agenttemp\agentupdate.bat", Properties.Settings.Default.Scripts_FolderURI + "agentupdate.bat", true); Process UpdateRunner = new Process(); UpdateRunner.StartInfo.UseShellExecute = true;