don't check file-sizes resume data for files that likely is in the partfile (#1268)

This commit is contained in:
Arvid Norberg 2016-10-29 13:53:24 -04:00 committed by GitHub
parent d1a59879cb
commit 7476f7875e
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,4 @@
* fix resumedata check issue with files with priority 0
* deprecated mmap_cache feature
* add utility function for generating peer ID fingerprint
* fix bug in last-seen-complete

View File

@ -1016,6 +1016,14 @@ namespace libtorrent
for (int i = 0; i < file_sizes_ent.list_size(); ++i)
{
if (fs.pad_file_at(i)) continue;
// files with priority zero may not have been saved to disk at their
// expected location, but is likely to be in a partfile. Just exempt it
// from checking
if (i < int(m_file_priority.size())
&& m_file_priority[i] == 0)
continue;
bdecode_node e = file_sizes_ent.list_at(i);
if (e.type() != bdecode_node::list_t
|| e.list_size() < 2