Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create_dip.py script changes file names from BagIt transfers #128

Open
djjuhasz opened this issue Nov 1, 2021 · 1 comment
Open

create_dip.py script changes file names from BagIt transfers #128

djjuhasz opened this issue Nov 1, 2021 · 1 comment

Comments

@djjuhasz
Copy link
Member

djjuhasz commented Nov 1, 2021

Running the create_dip.py on an AIP created from a transfer of a BagIt bag causes the initial three characters to be removed from all of the file names in the DIP objects directory. The following warning is output when this occurs:

INFO 2021-08-03 15:36:40 Moving file: objects/box4b12.bin
WARNING 2021-08-03 15:36:40 premis:originalName not starting with %transferDirectory%objects/

In the case above, the final file name in the DIP objects directory (zipped) was: 4b12.bin.

djjuhasz added a commit that referenced this issue Nov 2, 2021
Use `os.path.basename()` to get file names from the
`<premis:originalName>` path.

The previously assumed path of `%transferDirectory%objects` is not valid
for BagIt transfers, which lead to truncating the first three characters
of the filename in the DIP objects zip file.
djjuhasz added a commit that referenced this issue Nov 15, 2021
The previously assumed path of `%transferDirectory%objects` is not valid
for BagIt transfers, which have base directory of
`%transferDirectory%data`. This assumption created DIP file names with
their first three characters truncated, when the original transfer was a
BagIt bag.
@djjuhasz
Copy link
Member Author

djjuhasz commented Nov 15, 2021

Fix merged to "master" branch: e5a9f80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant