1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-25 14:04:23 +00:00

- Do not remove older torrent parameters files, just to be on the safe side

This commit is contained in:
Christophe Dumez 2009-08-27 13:18:45 +00:00
parent f3af4867fd
commit 64f1d306f4

View File

@ -1560,8 +1560,6 @@ void bittorrent::importOldTempData(QString torrent_path) {
savePath = QString::fromUtf8(line.data()); savePath = QString::fromUtf8(line.data());
qDebug("Imported the following save path: %s", savePath.toLocal8Bit().data()); qDebug("Imported the following save path: %s", savePath.toLocal8Bit().data());
TorrentTempData::setSavePath(hash, savePath); TorrentTempData::setSavePath(hash, savePath);
// Clean up
savepath_file.remove();
} }
// Load pieces priority // Load pieces priority
QFile pieces_file(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".priorities"); QFile pieces_file(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".priorities");
@ -1583,8 +1581,6 @@ void bittorrent::importOldTempData(QString torrent_path) {
TorrentTempData::setFilesPriority(hash, pp); TorrentTempData::setFilesPriority(hash, pp);
qDebug("Successfuly imported pieces_priority"); qDebug("Successfuly imported pieces_priority");
} }
// Clean up
pieces_file.remove();
} }
// Load sequential // Load sequential
if(QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".incremental")) { if(QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".incremental")) {
@ -1619,7 +1615,6 @@ void bittorrent::applyFormerAttributeFiles(QTorrentHandle h) {
h.force_reannounce(); h.force_reannounce();
} }
} }
tracker_file.remove();
} }
// Load Web seeds // Load Web seeds
QFile urlseeds_file(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+h.hash()+".urlseeds"); QFile urlseeds_file(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+h.hash()+".urlseeds");
@ -1649,7 +1644,6 @@ void bittorrent::applyFormerAttributeFiles(QTorrentHandle h) {
} }
} }
} }
urlseeds_file.remove();
} }
// Load speed limits // Load speed limits
QFile speeds_file(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+h.hash()+".speedLimits"); QFile speeds_file(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+h.hash()+".speedLimits");
@ -1665,7 +1659,6 @@ void bittorrent::applyFormerAttributeFiles(QTorrentHandle h) {
h.set_download_limit(speeds.at(0).toInt()); h.set_download_limit(speeds.at(0).toInt());
h.set_upload_limit(speeds.at(1).toInt()); h.set_upload_limit(speeds.at(1).toInt());
} }
speeds_file.remove();
} }
} }
@ -1696,8 +1689,6 @@ void bittorrent::importOldTorrents() {
if(!ok) if(!ok)
prio = 99999; prio = 99999;
prio_file.close(); prio_file.close();
// Clean up
prio_file.remove();
} }
} }
misc::insertSort2<QString>(filePaths, qMakePair(prio, filePath)); misc::insertSort2<QString>(filePaths, qMakePair(prio, filePath));