Browse Source

Always delete partfile (libtorrent 1.1.x).

adaptive-webui-19844
sledgehammer999 9 years ago
parent
commit
2efdddb9af
  1. 4
      src/base/bittorrent/session.cpp

4
src/base/bittorrent/session.cpp

@ -1040,7 +1040,11 @@ bool Session::deleteTorrent(const QString &hash, bool deleteLocalFiles)
QStringList unwantedFiles; QStringList unwantedFiles;
if (torrent->hasMetadata()) if (torrent->hasMetadata())
unwantedFiles = torrent->absoluteFilePathsUnwanted(); unwantedFiles = torrent->absoluteFilePathsUnwanted();
#if LIBTORRENT_VERSION_NUM < 10100
m_nativeSession->remove_torrent(torrent->nativeHandle()); m_nativeSession->remove_torrent(torrent->nativeHandle());
#else
m_nativeSession->remove_torrent(torrent->nativeHandle(), libt::session::delete_partfile);
#endif
// Remove unwanted and incomplete files // Remove unwanted and incomplete files
foreach (const QString &unwantedFile, unwantedFiles) { foreach (const QString &unwantedFile, unwantedFiles) {
qDebug("Removing unwanted file: %s", qPrintable(unwantedFile)); qDebug("Removing unwanted file: %s", qPrintable(unwantedFile));

Loading…
Cancel
Save