LibraryOfCongress / bagit-java

Java library to support the BagIt specification.
Other
73 stars 49 forks source link

missing path in verifier message for payload directory #123

Open rvanheest opened 6 years ago

rvanheest commented 6 years ago

In MandatoryVerifier.checkPayloadDirectoryExists, when the bag/data directory does not exist, it returns "File [{}] should exist but it doesn't!". The path does not seemed to be filled in correctly.

jscancella commented 6 years ago

@acdha line https://github.com/LibraryOfCongress/bagit-java/blob/66fc4654ff807111d89d4ee34e8bfe167056f75c/src/main/java/gov/loc/repository/bagit/verify/MandatoryVerifier.java#L87 should be throw new MissingPayloadDirectoryException(messages.getString("file_should_exist_error"), dataDir);

rvanheest commented 6 years ago

@jscancella shouldn't it also do something with MessageFormatter.format. I now see that in other places in that class as well...

jscancella commented 6 years ago

@rvanheest yes, sorry that's what I get for replying too quickly. I had it in my head it was the logger, not an exception.