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 {
27
27
if ($null -ne $Update ) {
28
28
29
29
# 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
37
37
38
38
$PSObject = [PSCustomObject ] @ {
39
39
Version = ($Update -split " \|" )[2 ]
40
- Filename = $Filename
40
+ Filename = ( Split-Path - Path $ ( $Update -split " \| " )[ -2 ] - Leaf)
41
41
URI = $res.Get.Download.Uri
42
42
}
43
43
Write-Output - InputObject $PSObject
You can’t perform that action at this time.
0 commit comments