From 0f5634bd19fbdaaf3d69e5dbb7b54c1201d10e0f Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Wed, 28 Jul 2021 17:27:01 +0800 Subject: [PATCH] Fix wrong version conditional `torrent_file_with_hashes()` was introduced in libtorrent v2.0.3. https://github.com/arvidn/libtorrent/releases/tag/v2.0.3 --- 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 aebb53d54844..47870de8903c 100644 --- a/src/base/bittorrent/session.cpp +++ b/src/base/bittorrent/session.cpp @@ -3891,7 +3891,7 @@ void Session::handleTorrentMetadataReceived(TorrentImpl *const torrent) // Copy the torrent file to the export folder if (!torrentExportDirectory().isEmpty()) { -#if (LIBTORRENT_VERSION_NUM >= 20000) +#if (LIBTORRENT_VERSION_NUM >= 20003) const TorrentInfo torrentInfo {torrent->nativeHandle().torrent_file_with_hashes()}; #else const TorrentInfo torrentInfo {torrent->nativeHandle().torrent_file()}; @@ -3949,7 +3949,7 @@ void Session::handleTorrentFinished(TorrentImpl *const torrent) // Move .torrent file to another folder if (!finishedTorrentExportDirectory().isEmpty()) { -#if (LIBTORRENT_VERSION_NUM >= 20000) +#if (LIBTORRENT_VERSION_NUM >= 20003) const TorrentInfo torrentInfo {torrent->nativeHandle().torrent_file_with_hashes()}; #else const TorrentInfo torrentInfo {torrent->nativeHandle().torrent_file()};