diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-11-05 15:50:49 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2007-11-05 15:50:49 +0000 |
| commit | 5641ac5b6b54d6d942fffbe3daf3af945665664e (patch) | |
| tree | 844c812403e891f18b178dd25ccd91d4189d4b4c /src/HttpResponseCommand.cc | |
| parent | 52b43151c62f52cff557f126fcd7062559b09e0e (diff) | |
2007-11-06 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed: Can not resume: aria2 reports download already finished.
* src/AbstractCommand.{h, cc}
* src/HttpResponseCommand.cc
* src/FtpNegotiateCommand.cc
Diffstat (limited to 'src/HttpResponseCommand.cc')
| -rw-r--r-- | src/HttpResponseCommand.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/HttpResponseCommand.cc b/src/HttpResponseCommand.cc index fccaf648..dba8007f 100644 --- a/src/HttpResponseCommand.cc +++ b/src/HttpResponseCommand.cc @@ -48,6 +48,7 @@ #include "SingleFileDownloadContext.h" #include "DiskAdaptor.h" #include "PieceStorage.h" +#include "DefaultBtProgressInfoFile.h" #include <sys/types.h> #include <unistd.h> @@ -130,8 +131,9 @@ bool HttpResponseCommand::handleDefaultEncoding(const HttpResponseHandle& httpRe return true; } + BtProgressInfoFileHandle infoFile = new DefaultBtProgressInfoFile(_requestGroup->getDownloadContext(), _requestGroup->getPieceStorage(), e->option); if(e->option->get(PREF_CHECK_INTEGRITY) != V_TRUE) { - if(downloadFinishedByFileLength()) { + if(!infoFile->exists() && downloadFinishedByFileLength()) { logger->notice(MSG_DOWNLOAD_ALREADY_COMPLETED, cuid, _requestGroup->getFilePath().c_str()); return true; } @@ -139,11 +141,11 @@ bool HttpResponseCommand::handleDefaultEncoding(const HttpResponseHandle& httpRe DownloadCommand* command = 0; try { + loadAndOpenFile(infoFile); File file(_requestGroup->getFilePath()); if(_requestGroup->getRemainingUris().empty() && !file.exists()) { command = createHttpDownloadCommand(httpResponse); } - loadAndOpenFile(); prepareForNextAction(command); e->noWait = true; } catch(Exception* e) { |
