mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-08 07:09:21 +00:00
* Clear the resume bitfield when resuming an incomplete download. This
will force rehashing if the program dies in a messy way. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@682 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -272,11 +272,18 @@ DownloadList::resume(Download* download) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (download->is_done())
|
||||
if (download->is_done()) {
|
||||
download->set_connection_type(download->variable()->get_string("connection_seed"));
|
||||
else
|
||||
} else {
|
||||
download->set_connection_type(download->variable()->get_string("connection_leech"));
|
||||
|
||||
// For the moment, clear the resume data so we force hash-check
|
||||
// on non-complete downloads after a crash. This shouldn't be
|
||||
// needed, but for some reason linux 2.6 is very lazy about
|
||||
// updating mtime.
|
||||
download->download()->hash_resume_clear();
|
||||
}
|
||||
|
||||
// Update the priority to ensure it has the correct
|
||||
// seeding/unfinished modifiers.
|
||||
download->set_priority(download->priority());
|
||||
|
||||
Reference in New Issue
Block a user