sul-dlss / cocina-models

Cocina repository data model (implemented in Ruby)
https://sul-dlss.github.io/cocina-models/
3 stars 0 forks source link

do not allow a file or folder in the root directory of a deposit to have the same name as the druid for that deposit #732

Closed andrewjbtw closed 3 months ago

andrewjbtw commented 3 months ago

I'm putting this ticket in DSA because I'm not sure where to file it. We probably would do best to make sure deposits don't contain a name collision earlier in the deposit process (H2, Preassembly, ?).


In the AWFL layout, we use this pattern for the content-addressed storage:

/stacks/bc/123/df/4567/bc123df4567

The original stacks layout puts files in:

/stacks/bc/123/df/4567

This means there's a name collision if the depositor names a file or folder bc123df4567 and places that in the root directory of their deposit. That would result in the depositor's own content being at the path

/stacks/bc/123/df/4567/bc123df4567

The results of this collision range from

There doesn't seem to be a problem if there's a druid-named folder or file outside of the root of the deposited content (example)

I tested with user-versioned items starting in H2 but since this is at the stacks layout level, the results would be the same for hierarchical deposits coming from Preassembly.