1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-07 13:48:00 -05:00

remove md5 check for windows update script as content-md5 header no longer appears to be transmitted

This commit is contained in:
RaidMax 2024-07-01 21:37:32 -05:00
parent f4946a9e76
commit cc8a6df463

View File

@ -61,8 +61,6 @@ if ($fileDownload.StatusDescription -ne "OK")
throw "Could not update IW4MAdmin. ($fileDownload.StatusDescription)"
}
$remoteHash = $fileDownload.Headers['Content-MD5']
$decodedHash = [System.BitConverter]::ToString([System.Convert]::FromBase64String($remoteHash)).replace('-', '')
$directoryPath = Get-Location
$fullPath = "$directoryPath\$filename"
$outputFile = [System.IO.File]::Open($fullPath, 2)
@ -88,13 +86,6 @@ finally
$outputFile.Dispose()
}
$localHash = (Get-FileHash -Path $fullPath -Algorithm MD5).Hash
if ($localHash -ne $decodedHash)
{
throw "Failed to update. File hashes don't match!"
}
Write-Output "Extracting $filename to $outputDir"
Expand-Archive -Path $fullPath -DestinationPath $outputDir -Force