mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 21:33:27 -07:00
Fix cases where the fastresume was wrongly overwritten when in 'Missing Files' status. Closes #3602.
This commit is contained in:
parent
86dba7bd21
commit
fd39efd846
1 changed files with 6 additions and 2 deletions
|
@ -1701,6 +1701,7 @@ void Session::handleTorrentChecked(TorrentHandle *const torrent)
|
||||||
|
|
||||||
void Session::handleTorrentFinished(TorrentHandle *const torrent)
|
void Session::handleTorrentFinished(TorrentHandle *const torrent)
|
||||||
{
|
{
|
||||||
|
if (!torrent->hasError() && !torrent->hasMissingFiles())
|
||||||
saveTorrentResumeData(torrent);
|
saveTorrentResumeData(torrent);
|
||||||
emit torrentFinished(torrent);
|
emit torrentFinished(torrent);
|
||||||
|
|
||||||
|
@ -2153,9 +2154,12 @@ void Session::handleAddTorrentAlert(libtorrent::add_torrent_alert *p)
|
||||||
torrent->resume();
|
torrent->resume();
|
||||||
logger->addMessage(tr("'%1' added to download list.", "'torrent name' was added to download list.")
|
logger->addMessage(tr("'%1' added to download list.", "'torrent name' was added to download list.")
|
||||||
.arg(torrent->name()));
|
.arg(torrent->name()));
|
||||||
|
|
||||||
|
// In case of crash before the scheduled generation
|
||||||
|
// of the fastresumes.
|
||||||
|
saveTorrentResumeData(torrent);
|
||||||
}
|
}
|
||||||
|
|
||||||
saveTorrentResumeData(torrent);
|
|
||||||
if ((torrent->ratioLimit() >= 0) && !m_bigRatioTimer->isActive())
|
if ((torrent->ratioLimit() >= 0) && !m_bigRatioTimer->isActive())
|
||||||
m_bigRatioTimer->start();
|
m_bigRatioTimer->start();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue