From 64806cb199f04b7ca98021721b2485392491eb51 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Thu, 6 Aug 2009 08:58:49 +0000 Subject: [PATCH] - Torrent is moved to temp dir on startup if it is supposed to be complete but data could not be found --- src/bittorrent.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 12c151b3b..fed917041 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -1255,6 +1255,15 @@ void bittorrent::readAlerts() { if(h.is_valid()){ QString hash = h.hash(); qDebug("%s have just finished checking", hash.toLocal8Bit().data()); + // Move to temp directory if necessary + if(!h.is_seed() && !defaultTempPath.isEmpty()) { + // Check if directory is different + QDir current_dir(h.save_path()); + QDir save_dir(getSavePath(h.hash())); + if(current_dir == save_dir) { + h.move_storage(defaultTempPath); + } + } emit torrentFinishedChecking(h); } }