diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-10-05 13:35:09 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-10-05 13:35:09 +0000 |
| commit | 5f1d8c789755f35eb90376f810672432fbfdf060 (patch) | |
| tree | 46718d73fdf817c1abe48a24685e3f3b0c961d8d /src/CheckIntegrityCommand.cc | |
| parent | 436448dd8a75d67daa794171c50f32bc4004be7c (diff) | |
2009-10-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Don't save control file when aria2 exists while checking piece
hash(behavior of -V option). If control file doesn't exist when
aria2 launched, the completed length in saved control file will be
0 byte and this confuses user. disableSaveControlFile() is called
in RequestGroup::processCheckIntegrityEntry().
enableSaveControlFile() will be called after hash checking is
done. See CheckIntegrityCommand.
* src/CheckIntegrityCommand.cc
* src/RequestGroup.cc
* src/RequestGroup.h
* src/RequestGroupMan.cc
Diffstat (limited to 'src/CheckIntegrityCommand.cc')
| -rw-r--r-- | src/CheckIntegrityCommand.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/CheckIntegrityCommand.cc b/src/CheckIntegrityCommand.cc index d7b92a2e..c3c0ca73 100644 --- a/src/CheckIntegrityCommand.cc +++ b/src/CheckIntegrityCommand.cc @@ -60,7 +60,10 @@ bool CheckIntegrityCommand::executeInternal() _entry->validateChunk(); if(_entry->finished()) { _e->_checkIntegrityMan->dropPickedEntry(); - + // Enable control file saving here. See also + // RequestGroup::processCheckIntegrityEntry() to know why this is + // needed. + _requestGroup->enableSaveControlFile(); if(_requestGroup->downloadFinished()) { logger->notice(MSG_VERIFICATION_SUCCESSFUL, _requestGroup->getDownloadContext()->getBasePath().c_str()); |
