Keep "torrent info" alive while generate .torrent file

This commit is contained in:
Vladimir Golovnev (Glassez) 2022-01-10 08:30:05 +03:00 committed by Vladimir Golovnev
commit 5ffa7e4752

View file

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