mirror of
https://github.com/aria2/aria2.git
synced 2026-04-13 16:23:03 +00:00
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.
This commit is contained in:
@@ -100,10 +100,6 @@ bool HttpResponseCommand::executeInternal()
|
||||
_requestGroup->validateTotalLengthByHint(httpResponse->getEntityLength());
|
||||
|
||||
_requestGroup->getSegmentMan()->filename = httpResponse->determinFilename();
|
||||
if(e->_requestGroupMan->isSameFileBeingDownloaded(_requestGroup)) {
|
||||
throw new FatalException(EX_DUPLICATE_FILE_DOWNLOAD, _requestGroup->getFilePath().c_str());
|
||||
}
|
||||
|
||||
if(httpResponse->isTransferEncodingSpecified()) {
|
||||
return handleOtherEncoding(httpResponse);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user