2009-11-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Refer to option value of PREF_OUT only in download_helper.
	* src/FtpNegotiationCommand.cc
	* src/HttpResponseCommand.cc
pull/1/head
Tatsuhiro Tsujikawa 2009-11-28 09:05:50 +00:00
parent d33c7c7db1
commit 9f6c187be4
3 changed files with 8 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2009-11-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Refer to option value of PREF_OUT only in download_helper.
* src/FtpNegotiationCommand.cc
* src/HttpResponseCommand.cc
2009-11-27 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Now addUri XML-RPC method accepts BitTorrent Magnet URI.

View File

@ -334,7 +334,7 @@ bool FtpNegotiationCommand::sendSize() {
bool FtpNegotiationCommand::onFileSizeDetermined(uint64_t totalLength)
{
_fileEntry->setLength(totalLength);
if(getOption()->get(PREF_OUT).empty()) {
if(_fileEntry->getPath().empty()) {
_fileEntry->setPath
(strconcat(getDownloadContext()->getDir(),
"/", util::urldecode(req->getFile())));

View File

@ -129,9 +129,7 @@ bool HttpResponseCommand::executeInternal()
if(_requestGroup->getPieceStorage().isNull()) {
uint64_t totalLength = httpResponse->getEntityLength();
_fileEntry->setLength(totalLength);
// We assume that in this context
// DownloadContext::getFileEntries().size() == 1
if(getOption()->get(PREF_OUT).empty()) {
if(_fileEntry->getPath().empty()) {
_fileEntry->setPath
(strconcat(getDownloadContext()->getDir(),
"/", httpResponse->determinFilename()));