diff --git a/CHANGELOG b/CHANGELOG index 1fbbaf5..afb8262 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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) diff --git a/mpl_data_cast/recipe.py b/mpl_data_cast/recipe.py index 52a6636..bb93890 100644 --- a/mpl_data_cast/recipe.py +++ b/mpl_data_cast/recipe.py @@ -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()