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

Work around layer name issue on case-insensitive file systems #129

Merged
merged 4 commits into from
Nov 28, 2023

Conversation

justvanrossum
Copy link
Collaborator

@justvanrossum justvanrossum commented Nov 28, 2023

The rcjk format does not play well with case-insensitive file systems: layer names become folder names, and to read layer names we read folder names. Since layer names are global per font, case differences in layer names can cause ambiguities. For example, if a layer "s2" exists, a folder named "s2" will be written. If "S2" (cap S!) also exists, its data will be happily written to the "s2" folder on a case-insensitive file system. When reading back the project, we find "s2", but not "S2".

This PR below tries to detect that situation and work around it. This works as long as the layer names within a single glyph are not ambiguous: "S1" and "s1" should not co-exist in the same glyph.

The problem can also happen when checking out an .rcjk git project on a case-insensitive file system: "S2" and "s2" may both exist in the repo, but on a macOS/Windows checkout only one of them will be seen.

@justvanrossum justvanrossum merged commit 57d0121 into main Nov 28, 2023
4 checks passed
@justvanrossum justvanrossum deleted the fudge-layernames branch November 28, 2023 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant