Skip to content

How to handle empty directories #16

@nkrabben

Description

@nkrabben

Current BagIt libraries differ in how they handle empty directories added as a payload. For example, with the following sample structure,
|-directory
| |-empty_directory
| |-payload_file
...
bagit-java (and Bagger) and bagins create the following data directory,
|-data
| |-payload_file
...
and bagit-python creates,
|-data
| |-empty_directory
| |-payload_file
...

Both are valid according to the spec, but I think that dropping the empty directory is not expected behavior. The spec has a suggestion in 2.1.3 to a zero-length file with the same name as the directory and keep as an extension (pointed out to me by @andrewjbtw), but I haven't seen any bagging tools follow this suggestion. Andrew and I do not see this as an expected behavior.

Can the specification be more explicit about how to handle empty directories? I prefer bagit-python's strategy, but realize that this means empty directories have no bearing on the completeness or fixity of a bag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions