reddsaver
reddsaver copied to clipboard
--human-readable flag tries to create invalid filenames on Windows
Hello!
I'm using Windows 10. Reddscaver, when using the --human-readable flag, will try to faithfully reproduce Reddit post titles as filenames that include invalid characters like "?". This results in a "WARN reddsaver::download] Could not create a file with the name: reddsaver/exampleSubreddit/this_is_an_example?_t3_abcdef.jpg. Skipping" and nothing is saved.
Ideally Reddsaver would strip invalid characters before attempting to save.
Actually, it looks like it's stripping some invalid characters, but missing some others (on windows).
https://github.com/manojkarthick/reddsaver/blob/e2e7573b9ed20a370db9f25077a0f430562aabce/src/download.rs#L380
Thanks! Would you be able to share a link to an example post that causes this issue? I don’t use a Windows PC so I haven’t encountered the issue.