Rawns / Reddit-Wallpaper-Changer

Reddit Wallpaper Changer
MIT License
121 stars 51 forks source link

Can't Save Wallpaper when special characters are used in Thread name #41

Closed radishism closed 7 years ago

radishism commented 7 years ago

Throws "Unable to save wallpaper locally" error on thread with ? character. e.g. https://www.reddit.com/r/EarthPorn/comments/5v92tl/mckinley_denali_whatever_you_wanna_call_it_its/

Rawns commented 7 years ago

Can you confirm your version? This was (at least, I thought it was) fixed under a previous release: https://github.com/Rawns/Reddit-Wallpaper-Changer/issues/22

radishism commented 7 years ago

Hi,

I'm running 1.0.12.0 - Just done it again with a path including ?

Cheers

Ian

On 02/03/2017 21:56, Paul Rawnsley wrote:

Can you confirm your version? This was fixed under a previous release:

22 https://github.com/Rawns/Reddit-Wallpaper-Changer/issues/22

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Rawns/Reddit-Wallpaper-Changer/issues/41#issuecomment-283795032, or mute the thread https://github.com/notifications/unsubscribe-auth/AY4IjQdYMyEzq-AdJ1oyJ1MDI2q40paDks5rhzr5gaJpZM4MOPM9.

benedikt257 commented 7 years ago

Interesting. I will have a look at this later tonight, maybe question marks are not returned by the method I used for getting invalid characters. @radishism could you also post your log to pastebin so I can see which threads are triggering the error messages?

radishism commented 7 years ago

Hi,

Not sure about pastbin, but hopefully this will work. The best example is:

28/02/2017 10:34:55 - LTP-IANS-01: Found a wallpaper! Title: McKinley? Denali? Whatever you wanna call it, it's HUGE. RWC.log.txt

benedikt257 commented 7 years ago

That'll do, thanks!

benedikt257 commented 7 years ago

This is odd, I cannot reproduce the behavior with the exact thread titles that are leading to problems on your machine. What operating system are you using?

radishism commented 7 years ago

Windows 10 Pro Version 1607 (Build 14393.693)

Rawns commented 7 years ago

I've found the problem. Removing the illegal characters from the post title has only been built into the "auto-save wallpapers" function, and your log shows you have auto-save disabled so presume you are manually saving select wallpapers like the one mentioned above from the right click option?

The manual save function does not have the check to remove any illegal characters from the saved wallpaper filename. I've updated the code to include this so it will be fixed in the next release. :)

Rawns commented 7 years ago

Fix pushed to dev branch. Will close once live.

radishism commented 7 years ago

I am manually saving. Well found!

Thanks for your efforts and thanks for a great product guys.

Rawns commented 7 years ago

Fixed in 1.0.13.0