Skip to content

Commit

Permalink
fix: fast file size check for detecting invalid upload did not take p…
Browse files Browse the repository at this point in the history
…lace
  • Loading branch information
paulmueller committed Nov 14, 2023
1 parent 166bd18 commit b94ce76
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
0.5.0
- fix: fast file size check for detecting invalid upload did not take place
- setup: migrate to pyproject.toml
0.4.2:
- fix: properly check output directory (#20)
Expand Down
2 changes: 1 addition & 1 deletion mpl_data_cast/recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def transfer_to_target_path(temp_path: pathlib.Path,
if target_path.exists():
if check_existing:
# first check the size, then the hash
if (temp_path.stat().st_size != temp_path.stat().st_size
if (target_path.stat().st_size != temp_path.stat().st_size
or hashfile(target_path) != hash_ok):
# The file is not the same, delete it and try again.
target_path.unlink()
Expand Down

0 comments on commit b94ce76

Please sign in to comment.