File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -27,17 +27,17 @@ Function Get-PiriformCCleanerFree {
2727 if ($null -ne $Update ) {
2828
2929 # Grab the download link headers to find the file name
30- $params = @ {
31- Uri = $res.Get.Download.Uri
32- Method = " Head"
33- ReturnObject = " Headers"
34- }
35- $Headers = Invoke-EvergreenWebRequest @params
36- $Filename = [RegEx ]::Match($Headers [' Content-Disposition' ], $res.Get.Download.MatchFilename ).Captures.Groups[1 ].Value
30+ # $params = @{
31+ # Uri = $res.Get.Download.Uri
32+ # Method = "Head"
33+ # ReturnObject = "Headers"
34+ # }
35+ # $Headers = Invoke-EvergreenWebRequest @params
36+ # $Filename = [RegEx]::Match($Headers['Content-Disposition'], $res.Get.Download.MatchFilename).Captures.Groups[1].Value
3737
3838 $PSObject = [PSCustomObject ] @ {
3939 Version = ($Update -split " \|" )[2 ]
40- Filename = $Filename
40+ Filename = ( Split-Path - Path $ ( $Update -split " \| " )[ -2 ] - Leaf)
4141 URI = $res.Get.Download.Uri
4242 }
4343 Write-Output - InputObject $PSObject
You can’t perform that action at this time.
0 commit comments