fix regression in left= reporting to trackers when adding a seeding torrent

This commit is contained in:
arvidn 2019-08-19 02:20:07 +02:00 committed by Arvid Norberg
parent b97ac317f6
commit af5fe587c0
2 changed files with 2 additions and 1 deletions

View File

@ -1,3 +1,4 @@
* fix regression in &left= reporting when adding a seeding torrent
* fix integer overflow in http parser
* improve sanitation of symlinks, to support more complex link targets
* add DHT routing table affinity for BEP 42 nodes

View File

@ -3579,7 +3579,7 @@ bool is_downloading_state(int const st)
if (!valid_metadata()) return {};
TORRENT_ASSERT(m_torrent_file->num_pieces() > 0);
if (m_seed_mode) return std::int64_t(0);
if (!has_picker()) return m_seed_mode ? std::int64_t(0) : m_torrent_file->total_size();
if (!has_picker()) return is_seed() ? std::int64_t(0) : m_torrent_file->total_size();
std::int64_t left
= m_torrent_file->total_size()