Breaking Change: don't try to normalize unicode in collision testing. #25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Initially, I tried to check if two entries had the same name in a case-insensitive way using
lowercase
.The function I should have used was
Unicode.normalize
However,
normalize
fails on invalid UTF-8, and it is not clear thatnormalize
is doing the same kind of normalization Windows does. In addition, on Windows it is possible to make a specific directory case sensitive.https://learn.microsoft.com/en-us/windows/wsl/case-sensitivity#change-the-case-sensitivity-of-files-and-directories
Because of these complications, I am no longer attempting to normalize or lowercase entry names when checking for collisions.
I also am now checking if a new file is an existing implicit or explicit directory, and if a new implicit or explicit directory is an existing file.
This means you will now get an error if you try to create "a.txt/b.txt" and "a.txt" in the same archive.