Emersont1 / itchio

https://pypi.org/project/itchiodl/
MIT License
105 stars 17 forks source link

Clean the path the same way on all platforms #81

Open triple-j opened 1 year ago

triple-j commented 1 year ago

I was testing --human-folders on Linux and ran into an issue where game names that contain a forward slash (/) would be broken up into multiple folders. So I removed the platform check in clean_path().

This is also better for compatibility. It's rare, but this allows someone to move their folders to different platforms. Since the files/folders are now created the same on all platform, the user won't accidentally re-download files if they run this project on multiple platforms.

Emersont1 commented 1 year ago

This is something I'm not sure about. The path cleanup is overzealous for linux and I (personally) am not a fan of the human readable names - I think escaping a / to a - is probably a better change

triple-j commented 1 year ago

I think compatibility across platforms is more important than to allow a few extra characters in Linux filenames.

As I mentioned before, those extra characters can cause problems when dealing with multiple platforms.

Here are some use cases that would be problematic if those extra characters aren't replaced:

Those are issue I've dealt with in the past and is why I always strip out characters that would be problematic for Windows, even if I mainly use Linux.