From fbb7887877ed9cc30b126cb8a7c4c4864d52dcbf Mon Sep 17 00:00:00 2001 From: bluepilledgreat <97983689+bluepilledgreat@users.noreply.github.com> Date: Thu, 5 Dec 2024 16:06:19 +0000 Subject: [PATCH] prevent installation inside of program files (#3904) --- Bloxstrap/Installer.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Bloxstrap/Installer.cs b/Bloxstrap/Installer.cs index ca1fa04..4eaeacf 100644 --- a/Bloxstrap/Installer.cs +++ b/Bloxstrap/Installer.cs @@ -124,6 +124,10 @@ namespace Bloxstrap if (String.Compare(Directory.GetParent(InstallLocation)?.FullName, Paths.UserProfile, StringComparison.InvariantCultureIgnoreCase) == 0) return false; + // prevent from installing into the program files folder + if (InstallLocation.Contains("Program Files")) + return false; + return true; }