prevent installation inside of program files (#3904)

This commit is contained in:
bluepilledgreat 2024-12-05 16:06:19 +00:00
parent b88751d825
commit fbb7887877

View File

@ -124,6 +124,10 @@ namespace Bloxstrap
if (String.Compare(Directory.GetParent(InstallLocation)?.FullName, Paths.UserProfile, StringComparison.InvariantCultureIgnoreCase) == 0) if (String.Compare(Directory.GetParent(InstallLocation)?.FullName, Paths.UserProfile, StringComparison.InvariantCultureIgnoreCase) == 0)
return false; return false;
// prevent from installing into the program files folder
if (InstallLocation.Contains("Program Files"))
return false;
return true; return true;
} }