ephraim / lcurse

Python script to have a "curse" compatible client for linux
The Unlicense
51 stars 24 forks source link

Cannot update addon if filename has a space #51

Open Nuadh opened 7 years ago

Nuadh commented 7 years ago

As title say, if the download redirect goes to a filename with a space, the client fails to update the addon with the error (in console): Could not open $filename , retrying...5 times, ending with HTTP Error 400: Bad Request.

I fixed the issue by adding a line at line 171 in waitdlg.py: downloadLink = re.sub(r" ", "%20", downloadLink) right below: downloadLink = soup.select(".download-link")[0].get('data-href')

ephraim commented 7 years ago

Do you have an example addon? .... So I can test my changes?

Nuadh commented 7 years ago

Back when it was an issue, it was "http://mods.curse.com/addons/wow/quest_completist", if it's fixed now on their side, I don't know.

*Edit: it seems to be fixed on their side now, filename is "QuestCompletist_v107.zip" now, no spaces.