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

Accented character in filename prevents payload verification on macOS #70

Closed
dmoles opened this issue Dec 4, 2022 · 1 comment · Fixed by #71
Closed

Accented character in filename prevents payload verification on macOS #70

dmoles opened this issue Dec 4, 2022 · 1 comment · Fixed by #71

Comments

@dmoles
Copy link
Contributor

dmoles commented Dec 4, 2022

Steps to reproduce

  1. create a bag containing a filename with an accented character, e.g. contrôle.txt.
  2. read the bag with Bag.read().
  3. call bag.isValid() (ignoreHiddenFiles can be true or false, doesn't matter).

Expected behavior

  • isValid() returns true

Actual behavior

System information

  • bagging version: 4.4
  • OS: macOS 12.6.1 Monterey
  • Java version: OpenJDK Runtime Environment Zulu17.30+15-CA (build 17.0.1+12-LTS)

Notes

It looks like this may be a long-standing Java / macOS issue to do with how HFS+ does Unicode normalization.

If toString() conversion seems too risky, an alternative would be to compare the paths with Files.isSameFile(Path, Path), which does seem to admit they're the same. I'll see if I can create a PR.

dmoles added a commit to dmoles/bagging that referenced this issue Jan 10, 2023
jscancella pushed a commit that referenced this issue Jan 11, 2023
* Unicode-normalize manifest and file paths before comparing; fixes issue #70

Signed-off-by: David Moles <[email protected]>

* add developer certificate for David Moles

Signed-off-by: David Moles <[email protected]>
@jscancella
Copy link
Owner

Fixed in version 4.6

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 a pull request may close this issue.

2 participants