From 0a8c2f75afe683e2d2b3db0374090052f4f4fbe6 Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (Glassez)" Date: Mon, 6 Apr 2020 12:16:27 +0300 Subject: [PATCH] Save "resume data" when torrent storage is moved --- src/base/bittorrent/torrenthandle.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/base/bittorrent/torrenthandle.cpp b/src/base/bittorrent/torrenthandle.cpp index 47ccdbceb..d2b0ae73b 100644 --- a/src/base/bittorrent/torrenthandle.cpp +++ b/src/base/bittorrent/torrenthandle.cpp @@ -1343,8 +1343,10 @@ bool TorrentHandle::setCategory(const QString &category) void TorrentHandle::move(QString path) { - m_useAutoTMM = false; - m_session->handleTorrentSavingModeChanged(this); + if (m_useAutoTMM) { + m_useAutoTMM = false; + m_session->handleTorrentSavingModeChanged(this); + } path = Utils::Fs::toUniformPath(path.trimmed()); if (path.isEmpty()) @@ -1526,6 +1528,7 @@ void TorrentHandle::handleStorageMoved(const QString &newPath, const QString &er LogMsg(tr("Successfully moved torrent: %1. New path: %2").arg(name(), newPath)); updateStatus(); + saveResumeData(); while ((m_renameCount == 0) && !m_moveFinishedTriggers.isEmpty()) m_moveFinishedTriggers.takeFirst()();