don't check file-sizes resume data for files that likely is in the partfile (#1268)
This commit is contained in:
parent
d1a59879cb
commit
7476f7875e
|
@ -1,3 +1,4 @@
|
||||||
|
* fix resumedata check issue with files with priority 0
|
||||||
* deprecated mmap_cache feature
|
* deprecated mmap_cache feature
|
||||||
* add utility function for generating peer ID fingerprint
|
* add utility function for generating peer ID fingerprint
|
||||||
* fix bug in last-seen-complete
|
* fix bug in last-seen-complete
|
||||||
|
|
|
@ -1016,6 +1016,14 @@ namespace libtorrent
|
||||||
for (int i = 0; i < file_sizes_ent.list_size(); ++i)
|
for (int i = 0; i < file_sizes_ent.list_size(); ++i)
|
||||||
{
|
{
|
||||||
if (fs.pad_file_at(i)) continue;
|
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);
|
bdecode_node e = file_sizes_ent.list_at(i);
|
||||||
if (e.type() != bdecode_node::list_t
|
if (e.type() != bdecode_node::list_t
|
||||||
|| e.list_size() < 2
|
|| e.list_size() < 2
|
||||||
|
|
Loading…
Reference in New Issue