From 3f61518f111d1ee550d92650f5595f5d4d213cc9 Mon Sep 17 00:00:00 2001 From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com> Date: Sun, 8 Dec 2024 11:52:42 +0000 Subject: [PATCH] fix font apply crash --- Bloxstrap/Bootstrapper.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Bloxstrap/Bootstrapper.cs b/Bloxstrap/Bootstrapper.cs index 660d02f8..7a7cfc71 100644 --- a/Bloxstrap/Bootstrapper.cs +++ b/Bloxstrap/Bootstrapper.cs @@ -916,7 +916,17 @@ private async Task ApplyModifications() const string path = "rbxasset://fonts/CustomFont.ttf"; - foreach (string jsonFilePath in Directory.GetFiles(Path.Combine(_latestVersionDirectory, "content\\fonts\\families"))) + // lets make sure the content/fonts/families path exists in the version directory + string contentFolder = Path.Combine(_latestVersionDirectory, "content"); + Directory.CreateDirectory(contentFolder); + + string fontsFolder = Path.Combine(contentFolder, "fonts"); + Directory.CreateDirectory(fontsFolder); + + string familiesFolder = Path.Combine(fontsFolder, "families"); + Directory.CreateDirectory(familiesFolder); + + foreach (string jsonFilePath in Directory.GetFiles(familiesFolder)) { string jsonFilename = Path.GetFileName(jsonFilePath); string modFilepath = Path.Combine(modFontFamiliesFolder, jsonFilename);