From f13656782af5582bb6ac78ac39aa03129c97652e Mon Sep 17 00:00:00 2001 From: Alexey Shumkin Date: Wed, 6 Dec 2017 23:55:50 +0300 Subject: [PATCH] fixed: win_copy failure from a VirtualBox share to a local path (#33576) --- lib/ansible/modules/windows/win_copy.ps1 | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/lib/ansible/modules/windows/win_copy.ps1 b/lib/ansible/modules/windows/win_copy.ps1 index 18607d8c21..1af1631d0b 100644 --- a/lib/ansible/modules/windows/win_copy.ps1 +++ b/lib/ansible/modules/windows/win_copy.ps1 @@ -87,14 +87,6 @@ Function Copy-File($source, $dest) { } $diff += "+$dest`n" - # make sure we set the attributes accordingly - if (-not $check_mode) { - $source_file = Get-Item -Path $source -Force - $dest_file = Get-Item -Path $dest -Force - $dest_file.Attributes = $source_file.Attributes - $dest_file.SetAccessControl($source_file.GetAccessControl()) - } - $result.changed = $true } @@ -119,13 +111,6 @@ Function Copy-Folder($source, $dest) { New-Item -Path $dest -ItemType Container -WhatIf:$check_mode | Out-Null $diff += "+$dest\`n" $result.changed = $true - - if (-not $check_mode) { - $source_folder = Get-Item -Path $source -Force - $dest_folder = Get-Item -Path $source -Force - $dest_folder.Attributes = $source_folder.Attributes - $dest_folder.SetAccessControl($source_folder.GetAccessControl()) - } } $child_items = Get-ChildItem -Path $source -Force