Skip to content

Commit

Permalink
Ensure installation ignores temp path (#2892)
Browse files Browse the repository at this point in the history
  • Loading branch information
pizzaboxer committed Sep 15, 2024
1 parent 6e8faff commit c58a8ab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Bloxstrap/Installer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ private bool ValidateLocation()
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;
Expand Down

0 comments on commit c58a8ab

Please sign in to comment.