mirror of
https://github.com/transmission/transmission
synced 2024-12-22 07:42:37 +00:00
fix: update torrent progress when verifying partially completed pieces (#7143)
* fix: update torrent progress when verifying partially completed pieces * chore: restrict scope of local variable
This commit is contained in:
parent
f5997eb5ed
commit
61ecad4c43
1 changed files with 1 additions and 3 deletions
|
@ -1699,9 +1699,7 @@ void tr_torrent::VerifyMediator::on_verify_started()
|
|||
|
||||
void tr_torrent::VerifyMediator::on_piece_checked(tr_piece_index_t const piece, bool const has_piece)
|
||||
{
|
||||
auto const had_piece = tor_->has_piece(piece);
|
||||
|
||||
if (has_piece != had_piece)
|
||||
if (auto const had_piece = tor_->has_piece(piece); !has_piece || !had_piece)
|
||||
{
|
||||
tor_->set_has_piece(piece, has_piece);
|
||||
tor_->set_dirty();
|
||||
|
|
Loading…
Reference in a new issue