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

Use overwrite flag for handle_cfmm2tar #203

Merged
merged 1 commit into from
Nov 10, 2023
Merged

Use overwrite flag for handle_cfmm2tar #203

merged 1 commit into from
Nov 10, 2023

Conversation

kaitj
Copy link
Collaborator

@kaitj kaitj commented Nov 10, 2023

Add a safety overwrite flag for dealing with overwriting "existing" cfmm2tar files. This overwrite is useful when new tars are found, but an existing tar already exists in the dataset - likely due to an unexpected shutdown, enabling the old file to be removed from the dataset, and the new file to be added. For some reason, deleting / removing via the datalad.api does not work here as the file is "not found".

This allows the same function to be used to run_cfmm2tar without overwriting if the target is not new (which it was previously doing).

@kaitj kaitj added the maintenance Updates or improvements that do not change functionality of the code label Nov 10, 2023
@kaitj kaitj self-assigned this Nov 10, 2023
Add a safety `overwrite` flag for dealing with overwriting "existing"
cfmm2tar files. This `overwrite` is useful when new tars are found, but
an existing tar already exists in the dataset - likely due to an
unexpected shutdown, enabling the old file to be removed from the
dataset, and the new file to be added.

This allows the same function to be used to `run_cfmm2tar` without
overwriting if the target is not new (which it was previously doing).
@kaitj kaitj force-pushed the maint/safe-overwrite branch from 1fb602d to 2c728ab Compare November 10, 2023 19:24
@kaitj kaitj merged commit 1941e52 into main Nov 10, 2023
2 checks passed
@kaitj kaitj deleted the maint/safe-overwrite branch November 10, 2023 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Updates or improvements that do not change functionality of the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant