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

PR #16825.
This commit is contained in:
Vladimir Golovnev 2022-04-07 07:15:31 +03:00 committed by GitHub
commit 8306a41d11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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