(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()

This commit is contained in:
Charles Kerr 2009-08-13 19:28:06 +00:00
parent 9d0760e58c
commit d318f1f0b8
1 changed files with 8 additions and 1 deletions

View File

@ -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 );