fix disk_io_thread::do_check_fastresume storage initialize logic from RC_1_1 merge
This commit is contained in:
parent
83dd6c9c53
commit
0ec66e9024
|
@ -2442,7 +2442,6 @@ constexpr disk_job_flags_t disk_interface::cache_hit;
|
||||||
// the error message indicates that the fast resume data was rejected
|
// the error message indicates that the fast resume data was rejected
|
||||||
// if 'fatal_disk_error' is returned, the error message indicates what
|
// if 'fatal_disk_error' is returned, the error message indicates what
|
||||||
// when wrong in the disk access
|
// when wrong in the disk access
|
||||||
storage_error se;
|
|
||||||
if ((rd->have_pieces.empty()
|
if ((rd->have_pieces.empty()
|
||||||
|| !j->storage->verify_resume_data(*rd
|
|| !j->storage->verify_resume_data(*rd
|
||||||
, links ? *links : aux::vector<std::string, file_index_t>(), j->error))
|
, links ? *links : aux::vector<std::string, file_index_t>(), j->error))
|
||||||
|
@ -2451,11 +2450,12 @@ constexpr disk_job_flags_t disk_interface::cache_hit;
|
||||||
// j->error may have been set at this point, by verify_resume_data()
|
// j->error may have been set at this point, by verify_resume_data()
|
||||||
// it's important to not have it cleared out subsequent calls, as long
|
// it's important to not have it cleared out subsequent calls, as long
|
||||||
// as they succeed.
|
// as they succeed.
|
||||||
if (j->storage->has_any_file(se))
|
storage_error ignore;
|
||||||
|
if (j->storage->has_any_file(ignore))
|
||||||
{
|
{
|
||||||
// always initialize the storage
|
// always initialize the storage
|
||||||
storage_error ignore;
|
storage_error se;
|
||||||
j->storage->initialize(ignore);
|
j->storage->initialize(se);
|
||||||
if (se)
|
if (se)
|
||||||
{
|
{
|
||||||
j->error = se;
|
j->error = se;
|
||||||
|
@ -2465,6 +2465,7 @@ constexpr disk_job_flags_t disk_interface::cache_hit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
storage_error se;
|
||||||
j->storage->initialize(se);
|
j->storage->initialize(se);
|
||||||
if (se)
|
if (se)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue