summaryrefslogtreecommitdiff
path: root/src/BtCheckIntegrityEntry.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2009-01-18 09:04:46 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2009-01-18 09:04:46 +0000
commit809a28fbae94df53186feb6827af336290850ee4 (patch)
tree418e90c6f091318a3cd599fe822eb15bcb70e39d /src/BtCheckIntegrityEntry.cc
parentb7feed9ba768b99f502140804735e64914ccf1b6 (diff)
2009-01-18 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added --bt-hash-check-seed option. If true is given to this option, after hash check using --check-integrity option and file is complete, continue to seed file. If you want to check file and download it only when it is damaged or incomplete, set this option to false. This option has effect only on BitTorrent download. The default value is true(This is the same behavior with the previous release). * src/BtCheckIntegrityEntry.cc * src/OptionHandlerFactory.cc * src/option_processing.cc * src/prefs.cc * src/prefs.h * src/usage_text.h
Diffstat (limited to 'src/BtCheckIntegrityEntry.cc')
-rw-r--r--src/BtCheckIntegrityEntry.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/BtCheckIntegrityEntry.cc b/src/BtCheckIntegrityEntry.cc
index aa14b223..203cf315 100644
--- a/src/BtCheckIntegrityEntry.cc
+++ b/src/BtCheckIntegrityEntry.cc
@@ -39,6 +39,8 @@
#include "DownloadEngine.h"
#include "FileAllocationMan.h"
#include "DiskAdaptor.h"
+#include "prefs.h"
+#include "Option.h"
namespace aria2 {
@@ -66,7 +68,9 @@ void BtCheckIntegrityEntry::onDownloadFinished(std::deque<Command*>& commands,
// are valid, then aira2 goes to seeding mode. Sometimes it is better
// to exit rather than doing seeding. So, it would be good to toggle this
// behavior.
- onDownloadIncomplete(commands, e);
+ if(e->option->getAsBool(PREF_BT_HASH_CHECK_SEED)) {
+ onDownloadIncomplete(commands, e);
+ }
}
} // namespace aria2