From f0965844ec6b57a8f181787a0422bfb3c0ed1900 Mon Sep 17 00:00:00 2001 From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com> Date: Fri, 27 Dec 2024 17:57:48 +0000 Subject: [PATCH] update 2.8.2 upgrade code --- Bloxstrap/Installer.cs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Bloxstrap/Installer.cs b/Bloxstrap/Installer.cs index f63df61..3547aeb 100644 --- a/Bloxstrap/Installer.cs +++ b/Bloxstrap/Installer.cs @@ -565,13 +565,19 @@ namespace Bloxstrap if (Utilities.CompareVersions(existingVer, "2.8.2") == VersionComparison.LessThan) { - try + string robloxDirectory = Path.Combine(Paths.Base, "Roblox"); + + if (Directory.Exists(robloxDirectory)) { - Directory.Delete(Path.Combine(Paths.Base, "Roblox"), true); - } - catch (Exception ex) - { - App.Logger.WriteException(LOG_IDENT, ex); + try + { + Directory.Delete(robloxDirectory, true); + } + catch (Exception ex) + { + App.Logger.WriteLine(LOG_IDENT, "Failed to delete the Roblox directory"); + App.Logger.WriteException(LOG_IDENT, ex); + } } }