mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 22:33:25 +00:00
win_unzip: overwrite any existing file
This commit is contained in:
committed by
Matt Clay
parent
7b0b4262e5
commit
e16bd19401
@@ -61,7 +61,8 @@ If ($ext -eq ".zip" -And $recurse -eq $false) {
|
|||||||
$shell = New-Object -ComObject Shell.Application
|
$shell = New-Object -ComObject Shell.Application
|
||||||
$zipPkg = $shell.NameSpace($src)
|
$zipPkg = $shell.NameSpace($src)
|
||||||
$destPath = $shell.NameSpace($dest)
|
$destPath = $shell.NameSpace($dest)
|
||||||
$destPath.CopyHere($zipPkg.Items())
|
# 20 means do not display any dialog (4) and overwrite any file (16)
|
||||||
|
$destPath.CopyHere($zipPkg.Items(), 20)
|
||||||
$result.changed = $true
|
$result.changed = $true
|
||||||
}
|
}
|
||||||
Catch {
|
Catch {
|
||||||
|
|||||||
Reference in New Issue
Block a user