From b97cb7422fe1ebc73f07ff9c68e7a8727087b397 Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Sat, 29 Oct 2016 19:11:02 +0300 Subject: [PATCH] Export torrents added only after the setting was enabled. --- src/base/bittorrent/session.cpp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/base/bittorrent/session.cpp b/src/base/bittorrent/session.cpp index 2ee70a2cd..393ca3fcc 100644 --- a/src/base/bittorrent/session.cpp +++ b/src/base/bittorrent/session.cpp @@ -445,11 +445,6 @@ Session::Session(QObject *parent) populateAdditionalTrackers(); enableTracker(isTrackerEnabled()); - if (!torrentExportDirectory().isEmpty()) { - qDebug("Torrent export is enabled, exporting the current torrents"); - foreach (TorrentHandle *const torrent, m_torrents) - exportTorrentFile(torrent); - } connect(Net::ProxyConfigurationManager::instance(), SIGNAL(proxyConfigurationChanged()), SLOT(configureDeferred())); @@ -599,16 +594,7 @@ QString Session::torrentExportDirectory() const void Session::setTorrentExportDirectory(const QString &path) { - if (path != torrentExportDirectory()) { - const bool wasDisabled = torrentExportDirectory().isEmpty(); - m_torrentExportDirectory = path; - - if (wasDisabled) { - qDebug("Torrent export is enabled, exporting the current torrents"); - foreach (TorrentHandle *const torrent, m_torrents) - exportTorrentFile(torrent); - } - } + m_torrentExportDirectory = path; } QString Session::finishedTorrentExportDirectory() const