mcdallas / gert

A command line tool to download media from Reddit
MIT License
51 stars 3 forks source link

-H flag sometimes causes errors on windows #7

Closed rareromfish closed 1 year ago

rareromfish commented 1 year ago

The -H flag seems to occasionally fail to write a file, because the filename would have an illegal character for a windows file name. Some kind of check for any of these banned characters and replacing them with a placeholder would be appreciated, as it currently just skips that file.

mcdallas commented 1 year ago

Which character is causing trouble? Some characters are being replaced already maybe add it to the list

https://github.com/mcdallas/gert/blob/aa0b103ee14e18e4c6406749e25cab2a9bb9d3d9/src/download.rs#L167-L172

rareromfish commented 1 year ago

? was what caused me to notice, although it looks like a few other ones are currently allowed that would cause windows to error. I made a pull request, but I'm not sure if it will work as I don't know how to compile rust code. Perhaps some of them need to be escaped?