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.CancellationTokenSource = new CancellationTokenSource();
|
||||||
Program.OutputTask = Program.MegaApiClient.DownloadFileAsync(selection.DownloadNode, Program.OutputFile, progress, Program.CancellationTokenSource.Token);
|
Program.OutputTask = Program.MegaApiClient.DownloadFileAsync(selection.DownloadNode, Program.OutputFile, progress, Program.CancellationTokenSource.Token);
|
||||||
await Program.OutputTask;
|
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);
|
UpdateUser("Searching for CreamAPI files in downloaded archive . . . ", LogColor.Operation);
|
||||||
string resourcePath = null;
|
string resourcePath = null;
|
||||||
List<ZipArchiveEntry> resources = new List<ZipArchiveEntry>();
|
List<ZipArchiveEntry> resources = new List<ZipArchiveEntry>();
|
||||||
|
|
|
@ -119,10 +119,11 @@ namespace CreamInstaller
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
File.Delete(OutputFile);
|
File.Delete(OutputFile);
|
||||||
|
InstallForm?.UpdateUser($"Deleted archive: {OutputFile}", LogColor.Cleanup);
|
||||||
}
|
}
|
||||||
catch
|
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;
|
OutputFile = null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue