win_unzip: overwrite any existing file

This commit is contained in:
Andrea Scarpino 2016-02-11 16:43:12 +01:00
parent df92a0be0a
commit 7c99a60f2b

View file

@ -61,7 +61,8 @@ If ($ext -eq ".zip" -And $recurse -eq $false) {
$shell = New-Object -ComObject Shell.Application
$zipPkg = $shell.NameSpace($src)
$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
}
Catch {