LibraryOfCongress / bagit-python

Work with BagIt packages from Python.
http://libraryofcongress.github.io/bagit-python
218 stars 85 forks source link

Multiple entries of a file in a manifest should not be allowed #94

Closed nkrabben closed 6 years ago

nkrabben commented 7 years ago

If a hash manifest has multiple entries for a file, bagit.py silently overwrites these hashes on top of one another. https://github.com/LibraryOfCongress/bagit-python/blob/master/bagit.py#L593

This isn't explicitly against the BagIt spec (2.1.3 is the relevant section), but I think bagit.py should flag these situations as invalid when loading a manifest.

acdha commented 6 years ago

I updated our proposed 1.0 spec changes to include that: https://github.com/LibraryOfCongress/bagit-spec/commit/66c24ebd46cf28c4543e0741ae56502cae141020

acdha commented 6 years ago

Shipped in 1.6.0