Correctly apply content layout when "Skip hash check" is enabled

PR #16825.
This commit is contained in:
Vladimir Golovnev 2022-04-06 14:01:41 +03:00 committed by GitHub
parent e42fa0e027
commit dded874350
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2298,8 +2298,8 @@ bool Session::addTorrent_impl(const std::variant<MagnetUri, TorrentInfo> &source
const auto nativeIndexes = torrentInfo.nativeIndexes();
if (!filePaths.isEmpty())
{
for (int index = 0; index < addTorrentParams.filePaths.size(); ++index)
p.renamed_files[nativeIndexes[index]] = addTorrentParams.filePaths.at(index).toString().toStdString();
for (int index = 0; index < filePaths.size(); ++index)
p.renamed_files[nativeIndexes[index]] = filePaths.at(index).toString().toStdString();
}
Q_ASSERT(p.file_priorities.empty());