I added this special field Bag-Size after I added the file. This way Bag-Size is not overwritten, as _update_info is not triggered. If you do it in another order, then you won't get this situation.
Of course I should not add these kind of fields, but shouldn't these keys be disallowed? The method remove_info for example refuses to remove them:
Bag-Size
now reads:Explanation:
I added this special field
Bag-Size
after I added the file. This wayBag-Size
is not overwritten, as _update_info is not triggered. If you do it in another order, then you won't get this situation.Of course I should not add these kind of fields, but shouldn't these keys be disallowed? The method
remove_info
for example refuses to remove them:https://github.com/LibreCat/Catmandu-BagIt/blob/master/lib/Catmandu/BagIt.pm#L654