cleanup output

This commit is contained in:
pointfeev 2021-10-24 20:47:19 -04:00
parent 0cbc98f6a7
commit d24ba494de
No known key found for this signature in database
GPG key ID: AA14DC36C4D7D13C
2 changed files with 3 additions and 2 deletions

View file

@ -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>();

View file

@ -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;
}