diff --git a/endpoints/v2/blob.py b/endpoints/v2/blob.py index f118566a3..adc59269c 100644 --- a/endpoints/v2/blob.py +++ b/endpoints/v2/blob.py @@ -224,7 +224,7 @@ def _upload_chunk(namespace, repo_name, upload_uuid): piece_hasher = None # TODO remove this when all in-progress blob uploads reliably contain piece hashes - if start_offset == 0 and found.piece_sha_state is not None: + if start_offset == 0 or found.piece_sha_state is not None: piece_hasher = PieceHasher(app.config['TORRENT_PIECE_SIZE'], start_offset, found.piece_hashes, found.piece_sha_state) input_fp = wrap_with_handler(input_fp, piece_hasher.update)