From 36ad3df9e7735740508b65d0e89bebf3e16df5ae Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sat, 9 Oct 2010 08:57:26 +0000 Subject: [PATCH] Fix feature to keep incomplete torrents in a separate folder --- Changelog | 1 + src/bittorrent.cpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index 28efe3070..f56936d8c 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,6 @@ *Unreleased - Christophe Dumez - v2.4.5 - BUGFIX: Remember torrent completion date correctly + - BUGFIX: Fix feature to keep incomplete torrents in a separate folder * Fri Oct 1 2010 - Christophe Dumez - v2.4.4 - BUGFIX: Clean program exit on system shutdown/logout diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index da8330ec1..49bff2681 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -864,7 +864,7 @@ QTorrentHandle Bittorrent::addMagnetUri(QString magnet_uri, bool resumed) { } QString torrent_name = misc::magnetUriToName(magnet_uri); const QString savePath(getSavePath(hash, false, QString::null, torrent_name)); - if(!defaultTempPath.isEmpty() && resumed && !TorrentPersistentData::isSeed(hash)) { + if(!defaultTempPath.isEmpty() && !TorrentPersistentData::isSeed(hash)) { qDebug("addMagnetURI: Temp folder is enabled."); qDebug("addTorrent::Temp folder is enabled."); QString torrent_tmp_path = defaultTempPath.replace("\\", "/"); @@ -1096,6 +1096,7 @@ QTorrentHandle Bittorrent::addTorrent(QString path, bool fromScanDir, QString fr } // Actually add the torrent QString root_folder = misc::truncateRootFolder(t); + qDebug("Truncated root folder: %s", qPrintable(root_folder)); add_torrent_params p; //Getting fast resume data if existing std::vector buf; @@ -1115,7 +1116,7 @@ QTorrentHandle Bittorrent::addTorrent(QString path, bool fromScanDir, QString fr } else { savePath = getSavePath(hash, fromScanDir, path, root_folder); } - if(!defaultTempPath.isEmpty() && resumed && !TorrentPersistentData::isSeed(hash)) { + if(!defaultTempPath.isEmpty() && !TorrentPersistentData::isSeed(hash)) { qDebug("addTorrent::Temp folder is enabled."); QString torrent_tmp_path = defaultTempPath.replace("\\", "/"); if(!root_folder.isEmpty()) {