File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ function Expand-MsiArchive {
141141 movedir " $DestinationPath \SourceDir\$ExtractDir " $DestinationPath | Out-Null
142142 Remove-Item " $DestinationPath \SourceDir" - Recurse - Force
143143 } elseif ($ExtractDir ) {
144- Get-ChildItem $DestinationPath - Exclude $ExtractDir | Remove-Item - Recurse - Force
144+ Get-ChildItem $DestinationPath - Exclude $ExtractDir , $Path | Remove-Item - Recurse - Force
145145 movedir " $DestinationPath \$ExtractDir " $DestinationPath | Out-Null
146146 } elseif (Test-Path " $DestinationPath \SourceDir" ) {
147147 movedir " $DestinationPath \SourceDir" $DestinationPath | Out-Null
@@ -236,7 +236,7 @@ function Expand-ZipArchive {
236236 Microsoft.PowerShell.Archive\Expand-Archive - Path $Path - DestinationPath $DestinationPath - Force
237237 }
238238 if ($ExtractDir ) {
239- Get-ChildItem $DestinationPath - Exclude $ExtractDir | Remove-Item - Recurse - Force
239+ Get-ChildItem $DestinationPath - Exclude $ExtractDir , $Path | Remove-Item - Recurse - Force
240240 movedir " $DestinationPath \$ExtractDir " $DestinationPath | Out-Null
241241 }
242242 if ($Removal ) {
@@ -276,7 +276,7 @@ function Expand-DarkArchive {
276276 Remove-Item $LogPath - Force
277277 }
278278 if ($ExtractDir ) {
279- Get-ChildItem $DestinationPath - Exclude $ExtractDir | Remove-Item - Recurse - Force
279+ Get-ChildItem $DestinationPath - Exclude $ExtractDir , $Path | Remove-Item - Recurse - Force
280280 movedir " $DestinationPath \$ExtractDir " $DestinationPath | Out-Null
281281 }
282282 if ($Removal ) {
You can’t perform that action at this time.
0 commit comments