From e8f229816ef01a0d7fba14ca71bc5ac115130662 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Mon, 18 Oct 2010 18:21:00 +0000 Subject: [PATCH] BUGFIX: Fix issues when marking a file as 'not downloaded' causes the torrent to complete --- Changelog | 1 + src/qtorrenthandle.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index f692fb647..37d93febe 100644 --- a/Changelog +++ b/Changelog @@ -2,6 +2,7 @@ - BUGFIX: Display the priority column when the queueing system gets enabled - BUGFIX: Fix encoding problem in file renaming - BUGFIX: Delete uneeded files on torrent "soft" deletion + - BUGFIX: Fix issues when marking a file as 'not downloaded' causes the torrent to complete * Sun Oct 17 2010 - Christophe Dumez - v2.4.6 - BUGFIX: Fix "torrent seeding after creation" feature diff --git a/src/qtorrenthandle.cpp b/src/qtorrenthandle.cpp index bdfb69dfa..2377a21bc 100644 --- a/src/qtorrenthandle.cpp +++ b/src/qtorrenthandle.cpp @@ -580,9 +580,12 @@ void QTorrentHandle::prioritize_files(const std::vector &v) { Q_ASSERT(h.is_valid()); if(v.size() != (unsigned int)h.get_torrent_info().num_files()) return; + bool was_seed = is_seed(); h.prioritize_files(v); - // Save seed status - TorrentPersistentData::saveSeedStatus(*this); + if(was_seed && !is_seed()) { + // Reset seed status + TorrentPersistentData::saveSeedStatus(*this); + } } void QTorrentHandle::set_ratio(float ratio) const {