From 30f4036c97e5d2639cb9cf754296aa2fff8efa94 Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (qlassez)" Date: Wed, 23 Dec 2015 14:13:49 +0300 Subject: [PATCH] Fix moving torrents to Temp after app restart Closes #4434 --- src/base/bittorrent/torrenthandle.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/base/bittorrent/torrenthandle.cpp b/src/base/bittorrent/torrenthandle.cpp index 707c1b08a..1d1b2ea05 100644 --- a/src/base/bittorrent/torrenthandle.cpp +++ b/src/base/bittorrent/torrenthandle.cpp @@ -1364,13 +1364,14 @@ void TorrentHandle::handleTorrentCheckedAlert(libtorrent::torrent_checked_alert qDebug("%s have just finished checking", qPrintable(hash())); updateStatus(); - adjustActualSavePath(); - if (progress() < 1.0 && wantedSize() > 0) + if ((progress() < 1.0) && (wantedSize() > 0)) m_hasSeedStatus = false; else if (progress() == 1.0) m_hasSeedStatus = true; + adjustActualSavePath(); + if (m_pauseAfterRecheck) { m_pauseAfterRecheck = false; pause(); @@ -1696,7 +1697,7 @@ bool TorrentHandle::isMoveInProgress() const bool TorrentHandle::useTempPath() const { - return !m_tempPathDisabled && m_session->isTempPathEnabled() && !isSeed(); + return !m_tempPathDisabled && m_session->isTempPathEnabled() && !(isSeed() || m_hasSeedStatus); } void TorrentHandle::updateStatus()