whikloj / BagItTools

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

Bag-Info is not written unless specifically set it as an extended bag. #21

Closed whikloj closed 3 years ago

whikloj commented 3 years ago

You are able to add bag info tags, but those are not written out if you have not also set the extended attribute. ie.

$bag = Bag::create($this->tmpdir);
$bag->addBagInfoTag("Contact-Name", "Jared Whiklo");
$bag->addBagInfoTag("Source-Organization", "The room.");
$bag->update();

Creates a bag like

bagit.txt
data/
manifest-sha512.txt

Should throw an exception to warn you to make your bag extended before adding tags.