1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 15:27:54 +00:00

Keep "torrent info" alive while generating .torrent file

PR #16018.
This commit is contained in:
Vladimir Golovnev 2022-01-11 07:29:42 +03:00 committed by GitHub
parent 709a053c7c
commit a3be239a60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -140,7 +140,7 @@ nonstd::expected<void, QString> TorrentInfo::saveToFile(const QString &path) con
try try
{ {
const auto torrentCreator = lt::create_torrent(*nativeInfo()); const auto torrentCreator = lt::create_torrent(*m_nativeInfo);
const lt::entry torrentEntry = torrentCreator.generate(); const lt::entry torrentEntry = torrentCreator.generate();
const nonstd::expected<void, QString> result = Utils::IO::saveToFile(path, torrentEntry); const nonstd::expected<void, QString> result = Utils::IO::saveToFile(path, torrentEntry);
if (!result) if (!result)