Ensure installation ignores temp path (#2892)

This commit is contained in:
pizzaboxer 2024-09-15 18:58:00 +01:00
parent 6e8faff624
commit c58a8ab739
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8

View File

@ -104,6 +104,10 @@ namespace Bloxstrap
if (InstallLocation.StartsWith("\\\\"))
return false;
if (InstallLocation.StartsWith(Path.GetTempPath(), StringComparison.InvariantCultureIgnoreCase)
|| InstallLocation.Contains("\\Temp\\", StringComparison.InvariantCultureIgnoreCase))
return false;
// prevent from installing to a onedrive folder
if (InstallLocation.Contains("OneDrive", StringComparison.InvariantCultureIgnoreCase))
return false;