From dded874350d757e58e5d14524c25dc8ab56b6421 Mon Sep 17 00:00:00 2001 From: Vladimir Golovnev Date: Wed, 6 Apr 2022 14:01:41 +0300 Subject: [PATCH] Correctly apply content layout when "Skip hash check" is enabled PR #16825. --- src/base/bittorrent/session.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base/bittorrent/session.cpp b/src/base/bittorrent/session.cpp index 22aa0c69d..e0c21cda7 100644 --- a/src/base/bittorrent/session.cpp +++ b/src/base/bittorrent/session.cpp @@ -2298,8 +2298,8 @@ bool Session::addTorrent_impl(const std::variant &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());