Skip to content

Commit

Permalink
Merge pull request #2250 from yan12125/issue1840
Browse files Browse the repository at this point in the history
(python3-streams) Also lockdown sub-folders
  • Loading branch information
Windos authored Jul 26, 2024
2 parents d088479 + 5de3954 commit b30d958
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions automatic/python3-streams/tools/helpers.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function Protect-InstallFolder {
$ErrorActionPreference = 'Stop'
try {
# get current acl
$acl = (Get-Item $folder).GetAccessControl('Access,Owner')
$acl = Get-Acl -Path $folder

Write-Debug "Removing existing permissions."
$acl.Access | ForEach-Object { $acl.RemoveAccessRuleAll($_) }
Expand Down Expand Up @@ -139,7 +139,7 @@ function Protect-InstallFolder {
$acl.SetAccessRuleProtection($true, $false)

# enact the changes against the actual
(Get-Item $folder).SetAccessControl($acl)
Set-Acl -Path $folder -AclObject $acl
}
catch {
Write-Warning "Not able to set permissions for $folder."
Expand Down

0 comments on commit b30d958

Please sign in to comment.