From 114de9ba8a909879812fefebe0b045e2c08d42ba Mon Sep 17 00:00:00 2001 From: KillzXGaming Date: Wed, 11 Dec 2019 19:13:25 -0500 Subject: [PATCH] Check for github release assets to prevent index issue --- Switch_Toolbox_Library/Helpers/TreeHelper.cs | 4 ---- Toolbox/UpdateProgram.cs | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Switch_Toolbox_Library/Helpers/TreeHelper.cs b/Switch_Toolbox_Library/Helpers/TreeHelper.cs index d822889c..19f88874 100644 --- a/Switch_Toolbox_Library/Helpers/TreeHelper.cs +++ b/Switch_Toolbox_Library/Helpers/TreeHelper.cs @@ -131,13 +131,9 @@ namespace Toolbox.Library file.SaveFileFormat(); if (file.FileDataStream != null) - { file.FileDataStream.ExportToFile(path); - } else - { File.WriteAllBytes($"{path}", file.FileData); - } } } diff --git a/Toolbox/UpdateProgram.cs b/Toolbox/UpdateProgram.cs index 4f0b7d63..0d0fe30f 100644 --- a/Toolbox/UpdateProgram.cs +++ b/Toolbox/UpdateProgram.cs @@ -32,6 +32,9 @@ namespace Toolbox foreach (Release latest in Releases) { + if (latest.Assets?.Count == 0) + continue; + Console.WriteLine( "The latest release is tagged at {0} and is named {1} commit {2} date {3}", latest.TagName,