From e81d3f71e25d798172b34622dd3efd376fad033c Mon Sep 17 00:00:00 2001 From: camradal Date: Wed, 18 Jan 2017 12:44:18 -0800 Subject: [PATCH] Fix win_unzip module hang on error (#20364) * Fix win_unzip module hang on error * Add documentation link for Folder.CopyHere flags --- lib/ansible/modules/windows/win_unzip.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/windows/win_unzip.ps1 b/lib/ansible/modules/windows/win_unzip.ps1 index 49724811624..119fa72fa3c 100644 --- a/lib/ansible/modules/windows/win_unzip.ps1 +++ b/lib/ansible/modules/windows/win_unzip.ps1 @@ -62,8 +62,9 @@ If ($ext -eq ".zip" -And $recurse -eq $false) { $shell = New-Object -ComObject Shell.Application $zipPkg = $shell.NameSpace([IO.Path]::GetFullPath($src)) $destPath = $shell.NameSpace([IO.Path]::GetFullPath($dest)) - # 20 means do not display any dialog (4) and overwrite any file (16) - $destPath.CopyHere($zipPkg.Items(), 20) + # From Folder.CopyHere documentation (https://msdn.microsoft.com/en-us/library/windows/desktop/bb787866.aspx) + # 1044 means do not display any error dialog (1024), progress dialog (4) and overwrite any file (16) + $destPath.CopyHere($zipPkg.Items(), 1044) $result.changed = $true } Catch {