Pārlūkot izejas kodu

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
Tatsuhiro Tsujikawa 16 gadi atpakaļ
vecāks
revīzija
9f6c187be4
3 mainītis faili ar 8 papildinājumiem un 4 dzēšanām
  1. 6 0
      ChangeLog
  2. 1 1
      src/FtpNegotiationCommand.cc
  3. 1 3
      src/HttpResponseCommand.cc

+ 6 - 0
ChangeLog

@@ -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.

+ 1 - 1
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())));

+ 1 - 3
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()));