BUGFIX: Fix detection of files at final destination when temp dir is used

This commit is contained in:
Christophe Dumez
2010-10-17 14:53:03 +00:00
parent b709bec24d
commit de04b47c29
2 changed files with 7 additions and 14 deletions

View File

@@ -1,6 +1,7 @@
* Unreleased - Christophe Dumez <chris@qbittorrent.org> - v2.4.6
- BUGFIX: Fix "torrent seeding after creation" feature
- BUGFIX: The properties panel data would sometimes not match the selected torrent
- BUGFIX: Fix detection of files at final destination when temp dir is used
* Tue Oct 12 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.4.5
- BUGFIX: Remember torrent completion date correctly

View File

@@ -864,11 +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() && !TorrentPersistentData::isSeed(hash)
#if LIBTORRENT_VERSION_MINOR > 14
&& !TorrentTempData::isSeedingMode(hash)
#endif
) {
if(!defaultTempPath.isEmpty() && !TorrentPersistentData::isSeed(hash) && resumed) {
qDebug("addMagnetURI: Temp folder is enabled.");
qDebug("addTorrent::Temp folder is enabled.");
QString torrent_tmp_path = defaultTempPath.replace("\\", "/");
@@ -917,10 +913,10 @@ QTorrentHandle Bittorrent::addMagnetUri(QString magnet_uri, bool resumed) {
Q_ASSERT(h.hash() == hash);
// If temp path is enabled, move torrent
/*if(!defaultTempPath.isEmpty() && !resumed) {
if(!defaultTempPath.isEmpty() && !resumed) {
qDebug("Temp folder is enabled, moving new torrent to temp folder");
h.move_storage(defaultTempPath);
}*/
}
// Connections limit per torrent
h.set_max_connections(Preferences::getMaxConnecsPerTorrent());
@@ -1120,11 +1116,7 @@ QTorrentHandle Bittorrent::addTorrent(QString path, bool fromScanDir, QString fr
} else {
savePath = getSavePath(hash, fromScanDir, path, root_folder);
}
if(!defaultTempPath.isEmpty() && !TorrentPersistentData::isSeed(hash)
#if LIBTORRENT_VERSION_MINOR > 14
&& !TorrentTempData::isSeedingMode(hash)
#endif
) {
if(!defaultTempPath.isEmpty() && !TorrentPersistentData::isSeed(hash) && resumed) {
qDebug("addTorrent::Temp folder is enabled.");
QString torrent_tmp_path = defaultTempPath.replace("\\", "/");
if(!root_folder.isEmpty()) {
@@ -1180,7 +1172,7 @@ QTorrentHandle Bittorrent::addTorrent(QString path, bool fromScanDir, QString fr
TorrentPersistentData::setRootFolder(hash, root_folder);
// If temp path is enabled, move torrent
/*if(!defaultTempPath.isEmpty() && !resumed) {
if(!defaultTempPath.isEmpty() && !resumed) {
qDebug("Temp folder is enabled, moving new torrent to temp folder");
QString torrent_tmp_path = defaultTempPath.replace("\\", "/");
if(!root_folder.isEmpty()) {
@@ -1188,7 +1180,7 @@ QTorrentHandle Bittorrent::addTorrent(QString path, bool fromScanDir, QString fr
torrent_tmp_path += root_folder;
}
h.move_storage(torrent_tmp_path);
}*/
}
// Connections limit per torrent
h.set_max_connections(Preferences::getMaxConnecsPerTorrent());