From d318f1f0b8f4bb086d951aef7029879f54e3f066 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Thu, 13 Aug 2009 19:28:06 +0000 Subject: [PATCH] (trunk libT) revision of r8915 for #1765: give the same user-level warning message if T first notices that a torrent's disappeared when it's doing a tr_torrentVerify() --- libtransmission/torrent.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libtransmission/torrent.c b/libtransmission/torrent.c index 114b84377..a2cdbf4a0 100644 --- a/libtransmission/torrent.c +++ b/libtransmission/torrent.c @@ -1332,9 +1332,15 @@ torrentRecheckDoneImpl( void * vtor ) assert( tr_isTorrent( tor ) ); tr_torrentRecheckCompleteness( tor ); - if( tor->startAfterVerify ) + if( tor->preVerifyTotal && !tr_cpHaveTotal( &tor->completion ) ) + { + tr_torrentSetLocalError( tor, _( "Can't find local data. Try \"Set Location\" to find it, or restart the torrent to re-download." ) ); + tr_torrentStop( tor ); + } + else if( tor->startAfterVerify ) { tor->startAfterVerify = FALSE; + tr_torrentStart( tor ); } } @@ -1365,6 +1371,7 @@ verifyTorrent( void * vtor ) } /* add the torrent to the recheck queue */ + tor->preVerifyTotal = tr_cpHaveTotal( &tor->completion ); tr_torrentUncheck( tor ); tr_verifyAdd( tor, torrentRecheckDoneCB );