Skip to content

Commit

Permalink
Fix updated save path not saved for paused torrents
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocobo1 committed Jun 15, 2019
1 parent 7d860b6 commit 9893a41
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/base/bittorrent/torrenthandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1789,6 +1789,9 @@ void TorrentHandle::handleFileRenamedAlert(const lt::file_renamed_alert *p)
--m_renameCount;
while (!isMoveInProgress() && (m_renameCount == 0) && !m_moveFinishedTriggers.isEmpty())
m_moveFinishedTriggers.takeFirst()();

if (isPaused() && (m_renameCount == 0))
saveResumeData(); // otherwise the new path will not be saved
}

void TorrentHandle::handleFileRenameFailedAlert(const lt::file_rename_failed_alert *p)
Expand All @@ -1804,6 +1807,9 @@ void TorrentHandle::handleFileRenameFailedAlert(const lt::file_rename_failed_ale
--m_renameCount;
while (!isMoveInProgress() && (m_renameCount == 0) && !m_moveFinishedTriggers.isEmpty())
m_moveFinishedTriggers.takeFirst()();

if (isPaused() && (m_renameCount == 0))
saveResumeData(); // otherwise the new path will not be saved
}

void TorrentHandle::handleFileCompletedAlert(const lt::file_completed_alert *p)
Expand Down

0 comments on commit 9893a41

Please sign in to comment.