fix typo in reporting file index in checking resume data
This commit is contained in:
parent
808282f447
commit
e1f4b5ad2d
|
@ -443,7 +443,7 @@ namespace libtorrent
|
||||||
file_storage const& fs = files();
|
file_storage const& fs = files();
|
||||||
for (int i = 0; i < int(prio.size()); ++i)
|
for (int i = 0; i < int(prio.size()); ++i)
|
||||||
{
|
{
|
||||||
int old_prio = m_file_priority[i];
|
int const old_prio = m_file_priority[i];
|
||||||
int new_prio = prio[i];
|
int new_prio = prio[i];
|
||||||
if (old_prio == 0 && new_prio != 0)
|
if (old_prio == 0 && new_prio != 0)
|
||||||
{
|
{
|
||||||
|
@ -882,14 +882,14 @@ namespace libtorrent
|
||||||
if (error != boost::system::errc::no_such_file_or_directory)
|
if (error != boost::system::errc::no_such_file_or_directory)
|
||||||
{
|
{
|
||||||
ec.ec = error;
|
ec.ec = error;
|
||||||
ec.file = i;
|
ec.file = file_index;
|
||||||
ec.operation = storage_error::stat;
|
ec.operation = storage_error::stat;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ec.ec = errors::mismatching_file_size;
|
ec.ec = errors::mismatching_file_size;
|
||||||
ec.file = i;
|
ec.file = file_index;
|
||||||
ec.operation = storage_error::stat;
|
ec.operation = storage_error::stat;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -900,7 +900,7 @@ namespace libtorrent
|
||||||
// the resume data indicates we're a seed, but this file has
|
// the resume data indicates we're a seed, but this file has
|
||||||
// the wrong size. Reject the resume data
|
// the wrong size. Reject the resume data
|
||||||
ec.ec = errors::mismatching_file_size;
|
ec.ec = errors::mismatching_file_size;
|
||||||
ec.file = i;
|
ec.file = file_index;
|
||||||
ec.operation = storage_error::check_resume;
|
ec.operation = storage_error::check_resume;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -908,7 +908,7 @@ namespace libtorrent
|
||||||
// OK, this file existed, good. Now, skip all remaining pieces in
|
// OK, this file existed, good. Now, skip all remaining pieces in
|
||||||
// this file. We're just sanity-checking whether the files exist
|
// this file. We're just sanity-checking whether the files exist
|
||||||
// or not.
|
// or not.
|
||||||
peer_request pr = fs.map_file(file_index, 0
|
peer_request const pr = fs.map_file(file_index, 0
|
||||||
, fs.file_size(file_index) + 1);
|
, fs.file_size(file_index) + 1);
|
||||||
i = (std::max)(i + 1, pr.piece);
|
i = (std::max)(i + 1, pr.piece);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue