Skip to content

Commit

Permalink
fix font apply crash
Browse files Browse the repository at this point in the history
  • Loading branch information
bluepilledgreat committed Dec 8, 2024
1 parent b68d43f commit 3f61518
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Bloxstrap/Bootstrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3f61518

Please sign in to comment.