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

check existing file before appending #52

Closed
leoyala opened this issue Dec 11, 2024 · 0 comments · Fixed by #53
Closed

check existing file before appending #52

leoyala opened this issue Dec 11, 2024 · 0 comments · Fixed by #53
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@leoyala
Copy link
Collaborator

leoyala commented Dec 11, 2024

🚀 Feature Request

If a .b2nd file already exists and new data is attempted to be written to it then a simple check on the metadata should be performed to ensure that the file is consistent before appending to it. This check should ensure that:

  • All expected metadata keys are available in the file
  • The length of the metadata values are the same as the number of images in the array.

If these conditions are not met, then an error message should pop-out indicating that new data cannot be written to that file and that a new name has to be indicated for the file.

🔈 Motivation

Currently, new data and metadata is appended to an existing file even if the metadata does not exist or the metadata is inconsistent, which can lead to missing metadata if the existing file is corrupted or has missing data.

🛰 Alternatives

Completely disallow appending data to an existing file.

📎 Additional context

None

@leoyala leoyala added the enhancement New feature or request label Dec 11, 2024
@leoyala leoyala added this to the v0.2.3 milestone Dec 11, 2024
@leoyala leoyala self-assigned this Dec 11, 2024
@leoyala leoyala linked a pull request Dec 19, 2024 that will close this issue
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant