Skip to content

Commit

Permalink
Delete update archive after unpacking
Browse files Browse the repository at this point in the history
  • Loading branch information
ocdtrekkie committed Jul 17, 2024
1 parent 7fe12aa commit 38770b9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 38770b9

Please sign in to comment.