Skip to content

Commit

Permalink
Fix overwriting issue when downloading multiple updates for the same …
Browse files Browse the repository at this point in the history
…KB Name

Fix for #224

When a given -Name parameter corresponds to multiple updates (download links), all files are downloaded to the same filename, causing each subsequent file to overwrite the previous one. Additionally, the resulting filename includes all update names concatenated together.
  • Loading branch information
KrX3D authored Dec 28, 2024
1 parent 0dcc43f commit f651cd8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions public/Save-KbUpdate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,9 @@ function Save-KbUpdate {
}
}

foreach ($dl in $object) {
foreach ($dl in $object.Link) {
$title = $dl.Title
$hyperlinklol = $object.Link
$hyperlinklol = $dl
if (-not $PSBoundParameters.FilePath) {
$FilePath = Split-Path -Path $hyperlinklol -Leaf
} else {
Expand Down Expand Up @@ -312,4 +312,4 @@ function Save-KbUpdate {
}
Write-Progress -Activity "Queuing up downloads" -Completed
}
}
}

0 comments on commit f651cd8

Please sign in to comment.