Fix win_git module for hidden folders
This commit is contained in:
parent
9fef9403b3
commit
0d1993ef53
@ -223,7 +223,7 @@ if ($recursive) {
|
|||||||
# Ensure the repository has the correct owner
|
# Ensure the repository has the correct owner
|
||||||
$userName = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name
|
$userName = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name
|
||||||
$idRef = [System.Security.Principal.NTAccount]::new($userName)
|
$idRef = [System.Security.Principal.NTAccount]::new($userName)
|
||||||
Get-Item $dest | foreach { `
|
Get-Item -Force $dest | foreach { `
|
||||||
$_ ; $_ | Get-ChildItem -Force -Recurse `
|
$_ ; $_ | Get-ChildItem -Force -Recurse `
|
||||||
} | foreach { `
|
} | foreach { `
|
||||||
$acl = $_ | Get-Acl; $acl.SetOwner($idRef); $_ | Set-Acl -AclObject $acl `
|
$acl = $_ | Get-Acl; $acl.SetOwner($idRef); $_ | Set-Acl -AclObject $acl `
|
||||||
|
Loading…
x
Reference in New Issue
Block a user