summaryrefslogtreecommitdiff
path: root/src/FtpNegotiationCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-08-28 15:46:49 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-08-28 15:46:49 +0000
commitf8aab322fc33194e8886eb630a01acda6c19e76b (patch)
treed17067aa7d3b30cb47ebd51091086a33d2eff914 /src/FtpNegotiationCommand.cc
parent7fb4336d5e6dbffe64fc39f84bbedd76a12237e6 (diff)
2007-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added auto file renaming feature in http(s)/ftp download. * src/main.cc: Added --auto-file-renaming command-line option. * src/OptionHandlerFactory.cc * src/prefs.h: Added PREF_AUTO_FILE_RENAMING * src/RequestGroup.{h, cc} (shouldCancelDownloadForSafety): Rewritten (tryAutoFileRenaming): New function. * src/SegmentMan.{h, cc} (shouldCancelDownloadForSafety): Removed. * src/HttpResponseCommand.cc (executeInternal): Removed the call to RequestGroupMan:: isSameFileBeingDownloaded() * src/FtpNegotiateCommand.cc (recvSize): Removed the call to RequestGroupMan:: isSameFileBeingDownloaded() * test/RequestGroupTest.cc: New class.
Diffstat (limited to 'src/FtpNegotiationCommand.cc')
-rw-r--r--src/FtpNegotiationCommand.cc5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/FtpNegotiationCommand.cc b/src/FtpNegotiationCommand.cc
index bd497228..4b5c3008 100644
--- a/src/FtpNegotiationCommand.cc
+++ b/src/FtpNegotiationCommand.cc
@@ -196,11 +196,6 @@ bool FtpNegotiationCommand::recvSize() {
// TODO validate filename and totalsize against hintFilename and hintTotalSize if these are provided.
_requestGroup->validateTotalLengthByHint(size);
-
- if(e->_requestGroupMan->isSameFileBeingDownloaded(_requestGroup)) {
- throw new FatalException(EX_DUPLICATE_FILE_DOWNLOAD, _requestGroup->getFilePath().c_str());
- }
-
if(req->getMethod() == Request::METHOD_HEAD) {
_requestGroup->getSegmentMan()->isSplittable = false; // TODO because we don't want segment file to be saved.
sequence = SEQ_HEAD_OK;