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

Issue 54 revert download #55

Merged
merged 2 commits into from
Jan 6, 2025
Merged

Issue 54 revert download #55

merged 2 commits into from
Jan 6, 2025

Conversation

kan-fu
Copy link
Collaborator

@kan-fu kan-fu commented Dec 16, 2024

Fix #54.

This PR simply reverts download by chunk back to download all, so that when things go wrong, it should leave an empty file instead of a file with partial file size. Also added the logic to treat 0-size file as non-existent, so that it will get overwritten even if overwrite=False.

This is useful when users find that some files are not downloaded successfully. They can simply rerun the script to re-download those invalid files while skipping valid files.

src/onc/modules/_util.py Show resolved Hide resolved
@spencerwplovie spencerwplovie merged commit 341a075 into main Jan 6, 2025
6 checks passed
@kan-fu kan-fu deleted the issue-54-revert-download branch February 7, 2025 21:54
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.

Improve re-downloading files when the previous download was stopped mid-way
2 participants