diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-11-28 09:05:50 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-11-28 09:05:50 +0000 |
| commit | 9f6c187be40485fe6c8cadb29aeedbc27b0acfa0 (patch) | |
| tree | dcbd9c7861fb0aa0eeb9bbbc991d932b03bba22d /src | |
| parent | d33c7c7db165f1e9aa06be207cdda1bb1c0adc70 (diff) | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/FtpNegotiationCommand.cc | 2 | ||||
| -rw-r--r-- | src/HttpResponseCommand.cc | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/FtpNegotiationCommand.cc b/src/FtpNegotiationCommand.cc index ce06d639..010bf573 100644 --- a/src/FtpNegotiationCommand.cc +++ b/src/FtpNegotiationCommand.cc @@ -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()))); diff --git a/src/HttpResponseCommand.cc b/src/HttpResponseCommand.cc index 101b58c1..675d0d9f 100644 --- a/src/HttpResponseCommand.cc +++ b/src/HttpResponseCommand.cc @@ -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())); |
