cleanup output
This commit is contained in:
parent
0cbc98f6a7
commit
d24ba494de
2 changed files with 3 additions and 2 deletions
|
@ -74,7 +74,7 @@ namespace CreamInstaller
|
|||
Program.CancellationTokenSource = new CancellationTokenSource();
|
||||
Program.OutputTask = Program.MegaApiClient.DownloadFileAsync(selection.DownloadNode, Program.OutputFile, progress, Program.CancellationTokenSource.Token);
|
||||
await Program.OutputTask;
|
||||
UpdateUser($"Downloaded file: {Program.OutputFile}", LogColor.Resource);
|
||||
UpdateUser($"Downloaded archive: {Program.OutputFile}", LogColor.Resource);
|
||||
UpdateUser("Searching for CreamAPI files in downloaded archive . . . ", LogColor.Operation);
|
||||
string resourcePath = null;
|
||||
List<ZipArchiveEntry> resources = new List<ZipArchiveEntry>();
|
||||
|
|
|
@ -119,10 +119,11 @@ namespace CreamInstaller
|
|||
try
|
||||
{
|
||||
File.Delete(OutputFile);
|
||||
InstallForm?.UpdateUser($"Deleted archive: {OutputFile}", LogColor.Cleanup);
|
||||
}
|
||||
catch
|
||||
{
|
||||
InstallForm?.UpdateUser($"WARNING: Failed to clean up downloaded archive: {OutputFile}", LogColor.Warning);
|
||||
InstallForm?.UpdateUser($"WARNING: Failed to clean up archive: {OutputFile}", LogColor.Warning);
|
||||
}
|
||||
OutputFile = null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue