Fix logic when deciding whether to hash for torrent
This commit is contained in:
parent
8d5f4466d6
commit
44fcc7e44b
1 changed files with 1 additions and 1 deletions
|
@ -224,7 +224,7 @@ def _upload_chunk(namespace, repo_name, upload_uuid):
|
||||||
|
|
||||||
piece_hasher = None
|
piece_hasher = None
|
||||||
# TODO remove this when all in-progress blob uploads reliably contain piece hashes
|
# 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,
|
piece_hasher = PieceHasher(app.config['TORRENT_PIECE_SIZE'], start_offset, found.piece_hashes,
|
||||||
found.piece_sha_state)
|
found.piece_sha_state)
|
||||||
input_fp = wrap_with_handler(input_fp, piece_hasher.update)
|
input_fp = wrap_with_handler(input_fp, piece_hasher.update)
|
||||||
|
|
Reference in a new issue