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());