-
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
Create bag in place with includeHidden = true #93
Comments
related to |
Thank you for reporting this issue! This is fixed in version 5.0.2. |
Thanks for the quick response. I agree bag-info is optional, but so is tagmanifest. Maybe a basic bag-info with Payload-Oxum and bagging date would be a good start? That's what we had in version 4 of this library, if I remember correctly. |
…in place, and defaults to include date bagged and payload-oxum
This latest commit looks great! Most of the stuff you added was added by me manually by setting the metadata elements manually and doing another |
When I call
BagCreator.bagInPlace
withincludeHidden = true
, the call produces ajava.nio.file.FileSystemException
. In this case it wants to move the newly createddata/
folder into itself (data/data/
), which isn't possible.An hour of debugging later I found out that this is because of the following code block:
Here
if(!path.equals(dataDir) && !Files.isHidden(path) || includeHidden)
must actually beif(!path.equals(dataDir) && (!Files.isHidden(path) || includeHidden))
(extra parentheses around!Files.isHidden(path) || includeHidden
). This has to do with operator precedence in Java:&&
binds stronger than||
.In the test suite I only found a test with
includeHidden = false
, which works correctly. If you will duplicate that one withincludeHidden = true
, you will find the same error.The text was updated successfully, but these errors were encountered: