mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
Don't stuck loading on mismatching info-hashes in resume data
PR #20262. Closes #20251.
This commit is contained in:
committed by
GitHub
parent
97c0abcbf0
commit
14513d051d
@@ -288,6 +288,16 @@ BitTorrent::LoadResumeDataResult BitTorrent::BencodeResumeDataStorage::loadTorre
|
||||
return nonstd::make_unexpected(tr("Cannot parse torrent info: %1").arg(QString::fromStdString(ec.message())));
|
||||
|
||||
p.ti = torrentInfo;
|
||||
|
||||
#ifdef QBT_USES_LIBTORRENT2
|
||||
if (((p.info_hashes.has_v1() && (p.info_hashes.v1 != p.ti->info_hashes().v1))
|
||||
|| (p.info_hashes.has_v2() && (p.info_hashes.v2 != p.ti->info_hashes().v2))))
|
||||
#else
|
||||
if (!p.info_hash.is_all_zeros() && (p.info_hash != p.ti->info_hash()))
|
||||
#endif
|
||||
{
|
||||
return nonstd::make_unexpected(tr("Mismatching info-hash detected in resume data"));
|
||||
}
|
||||
}
|
||||
|
||||
p.save_path = Profile::instance()->fromPortablePath(
|
||||
|
||||
Reference in New Issue
Block a user