mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix win_unzip module hang on error (#20364)
* Fix win_unzip module hang on error * Add documentation link for Folder.CopyHere flags
This commit is contained in:
parent
cc5080bc8a
commit
e81d3f71e2
1 changed files with 3 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue