From f86a574b9d7d10d5580f923c871f30f8957c2e8a Mon Sep 17 00:00:00 2001 From: Vladimir Golovnev Date: Wed, 24 Apr 2024 09:15:19 +0300 Subject: [PATCH] Don't forget to resume "missing files" torrent when rechecking PR #20747. --- src/base/bittorrent/torrentimpl.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/base/bittorrent/torrentimpl.cpp b/src/base/bittorrent/torrentimpl.cpp index 7cab602d7..fea7c3858 100644 --- a/src/base/bittorrent/torrentimpl.cpp +++ b/src/base/bittorrent/torrentimpl.cpp @@ -1519,7 +1519,17 @@ void TorrentImpl::forceRecheck() // an incorrect one during the interval until the cached state is updated in a regular way. m_nativeStatus.state = lt::torrent_status::checking_resume_data; - m_hasMissingFiles = false; + if (m_hasMissingFiles) + { + m_hasMissingFiles = false; + if (!isPaused()) + { + setAutoManaged(m_operatingMode == TorrentOperatingMode::AutoManaged); + if (m_operatingMode == TorrentOperatingMode::Forced) + m_nativeHandle.resume(); + } + } + m_unchecked = false; m_completedFiles.fill(false);