From 04cbd91f04205a848a00c89a3d794a95b40871a3 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Mon, 30 Mar 2009 22:01:33 +0000 Subject: [PATCH] - Added some debug - On torrent completion, save its fastresume data *AFTER* it was moved to final directory to avoid big problems (oops) --- src/FinishedTorrents.cpp | 1 + src/bittorrent.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/FinishedTorrents.cpp b/src/FinishedTorrents.cpp index 597a20f83..db6759fa3 100644 --- a/src/FinishedTorrents.cpp +++ b/src/FinishedTorrents.cpp @@ -347,6 +347,7 @@ void FinishedTorrents::forceRecheck(){ if(index.column() == F_NAME){ QString hash = finishedListModel->data(finishedListModel->index(index.row(), F_HASH)).toString(); QTorrentHandle h = BTSession->getTorrentHandle(hash); + qDebug("Forcing recheck for torrent %s", hash.toUtf8().data()); h.force_recheck(); } } diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 248207973..5fd4242e9 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -1140,7 +1140,6 @@ void bittorrent::readAlerts() { QFile finished_file(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".finished"); finished_file.open(QIODevice::WriteOnly | QIODevice::Text); finished_file.close(); - h.save_resume_data(); // Move to download directory if necessary if(!defaultTempPath.isEmpty()) { // Check if directory is different @@ -1150,6 +1149,7 @@ void bittorrent::readAlerts() { h.move_storage(save_dir.path()); } } + h.save_resume_data(); qDebug("Received finished alert for %s", h.name().toUtf8().data()); } }