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

Handle WARC filename conflicts with wb-manager add #902

Merged
merged 4 commits into from
Apr 24, 2024

Conversation

tw4l
Copy link
Member

@tw4l tw4l commented Apr 24, 2024

Description

Instead of not copying a WARC to the archive directory in case of a filename conflict, this PR instead modifies it to add the WARC with {original_name}-{dupe index}{extension} - i.e. example.warc.gz would be renamed to example-1.warc.gz, then example-2.warc.gz, and so on, until a filename that doesn't exist in the archive directory is found.

Motivation and Context

Should make for a more user-friendly experience of adding archives via wb-manager add.

Screenshots (if appropriate):

Types of changes

  • Replay fix (fixes a replay specific issue)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added or updated tests to cover my changes.
  • All new and existing tests passed.

@tw4l tw4l requested a review from ikreymer April 24, 2024 10:36
@tw4l
Copy link
Member Author

tw4l commented Apr 24, 2024

@ikreymer Would love to get your eyes on this to make sure I'm not missing any unintended side effects

@tw4l
Copy link
Member Author

tw4l commented Apr 24, 2024

Approved offline at WAC!

@tw4l tw4l merged commit b9f1609 into main Apr 24, 2024
10 checks passed
@tw4l tw4l deleted the handle-warc-filename-conflicts branch April 24, 2024 12:09
@Quirinus
Copy link
Contributor

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants