From 8e81983feef9b2905f7bd51996b803f8dd6f80a9 Mon Sep 17 00:00:00 2001 From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com> Date: Tue, 18 Mar 2025 10:12:46 +0000 Subject: [PATCH] fix crash in CleanupVersionsFolder --- Bloxstrap/Bootstrapper.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Bloxstrap/Bootstrapper.cs b/Bloxstrap/Bootstrapper.cs index 5578fe2..bfde105 100644 --- a/Bloxstrap/Bootstrapper.cs +++ b/Bloxstrap/Bootstrapper.cs @@ -859,6 +859,12 @@ namespace Bloxstrap return; } + if (!Directory.Exists(Paths.Versions)) + { + App.Logger.WriteLine(LOG_IDENT, "Versions directory does not exist, skipping cleanup."); + return; + } + foreach (string dir in Directory.GetDirectories(Paths.Versions)) { string dirName = Path.GetFileName(dir);