From 6c5c79664658e09f2ff8d890bba8106e4e9916c9 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 22 Aug 2011 23:24:39 +0900 Subject: 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. --- src/StreamCheckIntegrityEntry.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/StreamCheckIntegrityEntry.cc') 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& commands, DownloadEngine* e) { + if(getRequestGroup()->getOption()->getAsBool(PREF_HASH_CHECK_ONLY)) { + return; + } SharedHandle entry (new StreamFileAllocationEntry(getRequestGroup(), popNextCommand())); proceedFileAllocation(commands, entry, e); -- cgit