henrikstengaard / amiga-whdload-game-scripts

Amiga WHDLoad Game Scripts
17 stars 1 forks source link

Change to download_whdownload_games.ps1 needed - webclient.download throws exception #1

Open egnichtel opened 5 years ago

egnichtel commented 5 years ago

Line 93 of download_whdownload_games.ps1:

$webclient.DownloadFile($whdownloadGameUrl, $whdloadGameFile)

Throws and exception due to webclient not accepting path as part of the second parameter (it appears this was tightened up in the latest versions of .net).

To get around this, I changed line 93 to:

Invoke-Webrequest -Uri $whdownloadGameUrl -OutFile $whdloadGameFile

And that seems to work correctly.

This may be an issue in other scripts in your repo. (Thanks for writing these - they are very useful).

henrikstengaard commented 5 years ago

Thanks for the tip. I will update the scripts to use the powershell command Invoke-Webrequest