diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-08-22 23:24:39 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-08-22 23:34:17 +0900 |
| commit | 6c5c79664658e09f2ff8d890bba8106e4e9916c9 (patch) | |
| tree | d8a578a9fbc0f95fc78bef2e7ddc459dcebc1aab /src/StreamCheckIntegrityEntry.cc | |
| parent | 0d36c466d9c81030d1622294f2b0ade4fd0b5927 (diff) | |
Added --hash-check-only opiton.
Added --hash-check-only opiton. If true is given, after hash check
using --check-integrity option, abort download whether or not download
is complete. The default value is false.
Diffstat (limited to 'src/StreamCheckIntegrityEntry.cc')
| -rw-r--r-- | src/StreamCheckIntegrityEntry.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/StreamCheckIntegrityEntry.cc b/src/StreamCheckIntegrityEntry.cc index 569eaf48..3de23736 100644 --- a/src/StreamCheckIntegrityEntry.cc +++ b/src/StreamCheckIntegrityEntry.cc @@ -36,6 +36,8 @@ #include "RequestGroup.h" #include "DownloadEngine.h" #include "StreamFileAllocationEntry.h" +#include "prefs.h" +#include "Option.h" namespace aria2 { @@ -49,6 +51,9 @@ StreamCheckIntegrityEntry::~StreamCheckIntegrityEntry() {} void StreamCheckIntegrityEntry::onDownloadIncomplete (std::vector<Command*>& commands, DownloadEngine* e) { + if(getRequestGroup()->getOption()->getAsBool(PREF_HASH_CHECK_ONLY)) { + return; + } SharedHandle<FileAllocationEntry> entry (new StreamFileAllocationEntry(getRequestGroup(), popNextCommand())); proceedFileAllocation(commands, entry, e); |
