mirror of https://github.com/aria2/aria2
2010-09-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that aria2 reports error and exits with non-zero status when file is already downloaded. * src/FtpNegotiationCommand.cc * src/HttpResponseCommand.cc * src/RequestGroup.ccpull/1/head
parent
bf9fd473bb
commit
32e1aa1b59
|
@ -1,3 +1,11 @@
|
|||
2010-09-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Fixed the bug that aria2 reports error and exits with non-zero
|
||||
status when file is already downloaded.
|
||||
* src/FtpNegotiationCommand.cc
|
||||
* src/HttpResponseCommand.cc
|
||||
* src/RequestGroup.cc
|
||||
|
||||
2010-09-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Allow '@' in username and password embedded in URI. It should be
|
||||
|
|
|
@ -405,8 +405,10 @@ bool FtpNegotiationCommand::onFileSizeDetermined(uint64_t totalLength)
|
|||
if(getRequestGroup()->downloadFinishedByFileLength()) {
|
||||
getRequestGroup()->initPieceStorage();
|
||||
getPieceStorage()->markAllPiecesDone();
|
||||
// TODO It would be good to issue ChecksumCheckIntegrity here
|
||||
// instead of just pretending checksum verification is done.
|
||||
getDownloadContext()->setChecksumVerified(true);
|
||||
sequence_ = SEQ_DOWNLOAD_ALREADY_COMPLETED;
|
||||
|
||||
getLogger()->notice(MSG_DOWNLOAD_ALREADY_COMPLETED,
|
||||
util::itos(getRequestGroup()->getGID()).c_str(),
|
||||
getRequestGroup()->getFirstFilePath().c_str());
|
||||
|
@ -451,6 +453,9 @@ bool FtpNegotiationCommand::onFileSizeDetermined(uint64_t totalLength)
|
|||
if(!infoFile->exists() &&
|
||||
getRequestGroup()->downloadFinishedByFileLength()) {
|
||||
getPieceStorage()->markAllPiecesDone();
|
||||
// TODO It would be good to issue ChecksumCheckIntegrity here
|
||||
// instead of just pretending checksum verification is done.
|
||||
getDownloadContext()->setChecksumVerified(true);
|
||||
|
||||
sequence_ = SEQ_DOWNLOAD_ALREADY_COMPLETED;
|
||||
|
||||
|
|
|
@ -131,6 +131,9 @@ bool HttpResponseCommand::executeInternal()
|
|||
getFileEntry()->setLength(totalLength);
|
||||
getRequestGroup()->initPieceStorage();
|
||||
getPieceStorage()->markAllPiecesDone();
|
||||
// TODO It would be good to issue ChecksumCheckIntegrity here
|
||||
// instead of just pretending checksum verification is done.
|
||||
getDownloadContext()->setChecksumVerified(true);
|
||||
getLogger()->notice(MSG_DOWNLOAD_ALREADY_COMPLETED,
|
||||
util::itos(getRequestGroup()->getGID()).c_str(),
|
||||
getRequestGroup()->getFirstFilePath().c_str());
|
||||
|
@ -265,6 +268,9 @@ bool HttpResponseCommand::handleDefaultEncoding
|
|||
getOption().get()));
|
||||
if(!infoFile->exists() && getRequestGroup()->downloadFinishedByFileLength()) {
|
||||
getPieceStorage()->markAllPiecesDone();
|
||||
// TODO It would be good to issue ChecksumCheckIntegrity here
|
||||
// instead of just pretending checksum verification is done.
|
||||
getDownloadContext()->setChecksumVerified(true);
|
||||
getLogger()->notice(MSG_DOWNLOAD_ALREADY_COMPLETED,
|
||||
util::itos(getRequestGroup()->getGID()).c_str(),
|
||||
getRequestGroup()->getFirstFilePath().c_str());
|
||||
|
@ -370,6 +376,9 @@ bool HttpResponseCommand::handleOtherEncoding
|
|||
if(getRequestGroup()->downloadFinishedByFileLength()) {
|
||||
getRequestGroup()->initPieceStorage();
|
||||
getPieceStorage()->markAllPiecesDone();
|
||||
// TODO It would be good to issue ChecksumCheckIntegrity here
|
||||
// instead of just pretending checksum verification is done.
|
||||
getDownloadContext()->setChecksumVerified(true);
|
||||
getLogger()->notice(MSG_DOWNLOAD_ALREADY_COMPLETED,
|
||||
util::itos(getRequestGroup()->getGID()).c_str(),
|
||||
getRequestGroup()->getFirstFilePath().c_str());
|
||||
|
|
|
@ -426,6 +426,9 @@ void RequestGroup::createInitialCommand
|
|||
option_.get()));
|
||||
if(!infoFile->exists() && downloadFinishedByFileLength()) {
|
||||
pieceStorage_->markAllPiecesDone();
|
||||
// TODO It would be good to issue ChecksumCheckIntegrity here
|
||||
// instead of just pretending checksum verification is done.
|
||||
downloadContext_->setChecksumVerified(true);
|
||||
logger_->notice(MSG_DOWNLOAD_ALREADY_COMPLETED,
|
||||
util::itos(gid_).c_str(),
|
||||
downloadContext_->getBasePath().c_str());
|
||||
|
|
Loading…
Reference in New Issue