From 2efdddb9af514d9c1aa21b2d8bc90abb22edd016 Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Mon, 14 Mar 2016 14:53:14 +0200 Subject: [PATCH] Always delete partfile (libtorrent 1.1.x). --- src/base/bittorrent/session.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/base/bittorrent/session.cpp b/src/base/bittorrent/session.cpp index 5a36fdd8c..e781b15a6 100644 --- a/src/base/bittorrent/session.cpp +++ b/src/base/bittorrent/session.cpp @@ -1040,7 +1040,11 @@ bool Session::deleteTorrent(const QString &hash, bool deleteLocalFiles) QStringList unwantedFiles; if (torrent->hasMetadata()) unwantedFiles = torrent->absoluteFilePathsUnwanted(); +#if LIBTORRENT_VERSION_NUM < 10100 m_nativeSession->remove_torrent(torrent->nativeHandle()); +#else + m_nativeSession->remove_torrent(torrent->nativeHandle(), libt::session::delete_partfile); +#endif // Remove unwanted and incomplete files foreach (const QString &unwantedFile, unwantedFiles) { qDebug("Removing unwanted file: %s", qPrintable(unwantedFile));