mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-07 14:49:21 +00:00
* Make 'seeding' view trigger filtering on 'event.download.finished'.
* Fixed a potential buffer overflow in displaying of non-UTF8 filenames. * Changed torrent::DownloadList::close_directly() so doesn't save the session if the underlying file/directory has been moved or removed. This change, in addition to calling 'd.set_directory=' before 'execute=mv,...', as previously shown in the examples, will make rtorrent behave correctly when 'check_hash=no' is set. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1084 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -234,7 +234,9 @@ void
|
||||
DownloadList::close_directly(Download* download) {
|
||||
if (download->download()->is_active()) {
|
||||
download->download()->stop(torrent::Download::stop_skip_tracker);
|
||||
torrent::resume_save_progress(*download->download(), download->download()->bencode()->get_key("libtorrent_resume"));
|
||||
|
||||
if (torrent::resume_check_target_files(*download->download(), download->download()->bencode()->get_key("libtorrent_resume")))
|
||||
torrent::resume_save_progress(*download->download(), download->download()->bencode()->get_key("libtorrent_resume"));
|
||||
}
|
||||
|
||||
if (download->download()->is_open())
|
||||
@@ -519,14 +521,12 @@ void
|
||||
DownloadList::received_finished(Download* download) {
|
||||
check_contains(download);
|
||||
|
||||
if (rpc::call_command_value("get_check_hash")) {
|
||||
if (rpc::call_command_value("get_check_hash"))
|
||||
// Set some 'checking_finished_thingie' variable to make hash_done
|
||||
// trigger correctly, also so it can bork on missing data.
|
||||
hash_queue(download, Download::variable_hashing_last);
|
||||
|
||||
} else {
|
||||
else
|
||||
confirm_finished(download);
|
||||
}
|
||||
}
|
||||
|
||||
// The download must be open when we call this function.
|
||||
@@ -547,6 +547,8 @@ DownloadList::confirm_finished(Download* download) {
|
||||
|
||||
// Do this before the slots are called in case one of them closes
|
||||
// the download.
|
||||
//
|
||||
// Obsolete.
|
||||
if (!download->is_active() && rpc::call_command_value("get_session_on_completion") != 0) {
|
||||
torrent::resume_save_progress(*download->download(), download->download()->bencode()->get_key("libtorrent_resume"));
|
||||
control->core()->download_store()->save(download);
|
||||
|
||||
Reference in New Issue
Block a user