whikloj / BagItTools

A PHP BagIt library
MIT License
11 stars 5 forks source link

Wrong calculation of Payload-Oxum value #1

Closed henning-gerhardt closed 4 years ago

henning-gerhardt commented 4 years ago

Scenario: if you use more then one hash algorithm for your bag than the Payload-Oxum is calculated on amount of used hash algorithm. If you use for example two hash algorithm like sha512 and md5 and your bag contain 4 files inside the data directory. In this case the StreamCount value of Payload-Oxum is 8 and not 4. Even more the value of OctetCount is the double size of the correct value.

Reason for this is, that the used payloadFiles contain same data directory entry multiple times.

I can provide a simple correction against master or development branch.

whikloj commented 4 years ago

Resolved with https://github.com/whikloj/BagItTools/commit/d1cdc9e0c962aaebf132962e454f70c6dfbb255a