Skip to content

Case-insensitive ZIP loading #204

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

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

NotHyper-474
Copy link

@NotHyper-474 NotHyper-474 commented Mar 6, 2025

This mod shows an interesting problem that is, the modder might not care enough for the letter case of the files, which may cause inconsistent behavior (files not loading) not only in case-sensitive platforms (like Linux) but also when trying to load their mod as a ZIP.

This PR aims to solve at least the ZIP part. I might look into the Linux issue later.

@NotHyper-474 NotHyper-474 changed the title Case-insensitive ZIP parsing Case-insensitive ZIP loading Mar 6, 2025
@NotHyper-474 NotHyper-474 force-pushed the insens-zip-parsing branch 2 times, most recently from e9d6862 to c494606 Compare March 9, 2025 02:05
@NotHyper-474 NotHyper-474 marked this pull request as ready for review March 9, 2025 02:20
@NotHyper-474 NotHyper-474 force-pushed the insens-zip-parsing branch 3 times, most recently from 289085b to e49dfb9 Compare April 4, 2025 19:55
@EliteMasterEric
Copy link
Collaborator

This code seems good but I wonder if the behavior could be made optional (via a compilation flag or similar) since some applications may expect case-sensitive asset loading. Or maybe we could do the opposite and ensure case-sensitive asset loading on Windows.

@NotHyper-474 NotHyper-474 changed the base branch from develop to master April 10, 2025 00:53
@NotHyper-474 NotHyper-474 changed the base branch from master to develop April 10, 2025 00:53
@NotHyper-474
Copy link
Author

NotHyper-474 commented Apr 10, 2025

Done. Now you need to set a POLYMOD_ZIP_INSENSITIVE define to enable it, (although maybe it should be enabled by default?) also it needs #208 to work properly.

Or maybe we could do the opposite and ensure case-sensitive asset loading on Windows.

Definitely would break a mod or two (I know for sure QT: Rewired would be among these as it has a couple of vocals that don't load on Linux). Personally I'm more inclined towards ensuring case-insensitive loading on Linux instead, but up to you.

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