Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean the path the same way on all platforms #81

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

triple-j
Copy link
Contributor

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
Copy link
Owner

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
Copy link
Contributor Author

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:

  • Running itch-download on a Linux NAS and sharing the download folder over Samba (Windows network sharing) to Windows computers.
  • Having a Linux/Windows dual boot system. Running itch-download on the Linux partition with the download folder being accessible by Windows.
  • Running itch-download on the Linux. Copying the download folder to a USB drive and trying to read that on a Windows system.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants