even more err handling lol

This commit is contained in:
N00MKRAD
2021-06-20 18:35:58 +02:00
parent 899cc9f064
commit c8551aabd3

View File

@@ -144,7 +144,7 @@ namespace Flowframes.IO
string jsonPath = Path.Combine(mdlDir, "files.json");
List<ModelFile> modelFiles = GetModelFilesFromJson(File.ReadAllText(jsonPath));
if (IOUtils.GetFilesize(jsonPath) < 32)
if (!File.Exists(jsonPath) || IOUtils.GetFilesize(jsonPath) < 32)
{
Interpolate.Cancel($"Error: Failed to download index file. Please try again.");
return;