summaryrefslogtreecommitdiff
path: root/src/HttpResponseCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-11-08 00:59:57 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-11-08 00:59:57 +0900
commite1e6bb1ec5a813c7e86343d4fdb451d18ac048f0 (patch)
treec6e60d6fb2af96f065d8f909257d7e2febd5b998 /src/HttpResponseCommand.cc
parent2aa8e01836da65fca6b19843610ec438eeca4b4a (diff)
Don't fail multiple concurrent dl same file if auto-file-renaming is enabled
Diffstat (limited to 'src/HttpResponseCommand.cc')
-rw-r--r--src/HttpResponseCommand.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/HttpResponseCommand.cc b/src/HttpResponseCommand.cc
index 3bda5e86..4c047a27 100644
--- a/src/HttpResponseCommand.cc
+++ b/src/HttpResponseCommand.cc
@@ -74,6 +74,7 @@
#include "uri.h"
#include "SocketRecvBuffer.h"
#include "MetalinkHttpEntry.h"
+#include "NullProgressInfoFile.h"
#ifdef ENABLE_MESSAGE_DIGEST
# include "Checksum.h"
# include "ChecksumCheckIntegrityEntry.h"
@@ -258,11 +259,6 @@ bool HttpResponseCommand::executeInternal()
}
fe->setContentType(httpResponse->getContentType());
grp->preDownloadProcessing();
- if (getDownloadEngine()->getRequestGroupMan()->isSameFileBeingDownloaded(grp)) {
- throw DOWNLOAD_FAILURE_EXCEPTION2(fmt(EX_DUPLICATE_FILE_DOWNLOAD,
- grp->getFirstFilePath().c_str()),
- error_code::DUPLICATE_DOWNLOAD);
- }
// update last modified time
updateLastModifiedTime(httpResponse->getLastModifiedTime());
@@ -451,7 +447,7 @@ bool HttpResponseCommand::handleOtherEncoding(
return true;
}
- getRequestGroup()->shouldCancelDownloadForSafety();
+ getRequestGroup()->adjustFilename(std::make_shared<NullProgressInfoFile>());
getRequestGroup()->initPieceStorage();
getPieceStorage()->getDiskAdaptor()->initAndOpenFile();