Skip to content

The selection of tag files is broken #75

Closed
@RKrahl

Description

@RKrahl

The function _find_tag_files() that selects files to be added to tagmanifest files as added by PR #69 is broken. The intention of this function was to select all files in the bag directory excluding only the payload directory and the tagmanifest files. What the logic in this function actually does, is to select all files excluding files in any directory whose name ends with "data". This is broken in two different ways:

  1. if the bag directory itself ends with "data", all files in this bag directory are excluded, although bag-info.txt, bagit.txt, and manifest-*.txt should in particular be added.
  2. if the payload directory contains any subdirectories not ending with "data", files in this subdirectories are selected for inclusion to the tagmanifest files, although these files, being part of the payload, should not be added.

This bug has been discovered by Kieran O'Leary in the discussion of PR #67.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions