-
Notifications
You must be signed in to change notification settings - Fork 49
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
BagLinter always adds 'different_case' warning #119
Comments
…ess#119) This ensures that the test won’t flag the file it just added for any case where the filename isn’t already lowercased.
…ess#119) This ensures that the test won’t flag the file it just added for any case where the filename isn’t already lowercased.
I created #120 simply to do the check first. Today has been rather busy so a second set of eyes on the code would be appreciated. |
@acdha From reasoning through the code this looks fine. But I wasn't able to test it with the code change in my own project, since I can't find a way to build this project to my local Maven repository directory. I keep hitting errors with the current gradle configuration. What surprises me a bit is that no tests we added or changed. I was looking and running |
@acdha I originally created this to catch potential errors like After looking at this more, it looks like you are correct and this is indeed from adding it to the paths too early. |
…t to check for any issues in the future
…with bagit-python. Also added tests for valid bags of each standard algorithm
I just upgraded to v1.2.0 of this library. With the upgraded stuff on BagIt v1.0 in #118, a new bug has entered the library:
When using the
BagLinter
, the warningdifferent_case
will always be shown. Given it's description:I would not expect this to happen on a bag with only very distinct files.
I think the bug is as follows: in the code below a manifest file is read and for each line the
path
is added to the Setpaths
(after being converted to lowercase).bagit-java/src/main/java/gov/loc/repository/bagit/conformance/ManifestChecker.java
Lines 119 to 139 in 97a6770
Immediately after that
checkForDifferentCase
is called, which checks whetherpaths.contains(path.toLowerCase())
. Of course, this is always true, sincepath
was just added topaths
before this check.bagit-java/src/main/java/gov/loc/repository/bagit/conformance/ManifestChecker.java
Lines 174 to 183 in 97a6770
The text was updated successfully, but these errors were encountered: