mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-12 13:12:32 +00:00
* Expand the path when unlinking the tied file.
* Use DownloadWrapper* to identify hashing chunks, rather than the info hash. * When hashing fails, retry the most common blocks. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@729 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
+2
-1
@@ -45,6 +45,7 @@
|
||||
#include <rak/address_info.h>
|
||||
#include <rak/error_number.h>
|
||||
#include <rak/regex.h>
|
||||
#include <rak/path.h>
|
||||
#include <rak/string_manip.h>
|
||||
#include <sigc++/bind.h>
|
||||
#include <sigc++/hide.h>
|
||||
@@ -112,7 +113,7 @@ delete_tied(Download* d) {
|
||||
if (tie.empty())
|
||||
return;
|
||||
|
||||
if (::unlink(tie.c_str()) == -1)
|
||||
if (::unlink(rak::path_expand(tie).c_str()) == -1)
|
||||
control->core()->push_log("Could not unlink tied file: " + std::string(rak::error_number::current().c_str()));
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ WindowDownloadTransferList::redraw() {
|
||||
// prettify this. (This is a very subtle hint)
|
||||
|
||||
for (int y = 1; y < m_canvas->get_height() && itr != transfers->end(); ++y, ++itr) {
|
||||
m_canvas->print(0, y, "%5u ", (*itr)->index());
|
||||
m_canvas->print(0, y, "%5u [P: %u F: %u]", (*itr)->index(), (*itr)->priority(), (*itr)->failed());
|
||||
|
||||
// Handle window size.
|
||||
for (torrent::BlockList::const_iterator bItr = (*itr)->begin(), bLast = (*itr)->end(); bItr != bLast; ++bItr) {
|
||||
|
||||
@@ -235,7 +235,7 @@ apply_stop_on_ratio(Control* m, const std::string& arg) {
|
||||
|
||||
if ((totalUpload >= min_Upload && totalUpload * 100 >= totalDone * min_Ratio) ||
|
||||
(max_Ratio > 0 && totalUpload * 100 > totalDone * max_Ratio)) {
|
||||
if ((*itr)->variable()->get_value("ignore_ratio") <= 0)
|
||||
if ((*itr)->variable()->get_value("ignore_ratio") == 0)
|
||||
m->core()->download_list()->stop(*itr);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user