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

Removed options which is only valid for URIs specified in
	command-line.  If they are left, because op is used as a template
	for new RequestGroup(such as created in XML-RPC command,
	BtPostDownloadHandler etc), they causes unintentional effect.
	* src/main.cc
pull/1/head
Tatsuhiro Tsujikawa 2009-11-28 09:07:21 +00:00
parent 9f6c187be4
commit b80de5e010
2 changed files with 17 additions and 0 deletions

View File

@ -1,3 +1,11 @@
2009-11-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed options which is only valid for URIs specified in
command-line. If they are left, because op is used as a template
for new RequestGroup(such as created in XML-RPC command,
BtPostDownloadHandler etc), they causes unintentional effect.
* src/main.cc
2009-11-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Refer to option value of PREF_OUT only in download_helper.

View File

@ -250,6 +250,15 @@ downloadresultcode::RESULT main(int argc, char* argv[])
createRequestGroupForUri(requestGroups, op, args);
}
// Remove option values which is only valid for URIs specified in
// command-line. If they are left, because op is used as a
// template for new RequestGroup(such as created in XML-RPC
// command), they causes unintentional effect.
op->remove(PREF_OUT);
op->remove(PREF_FORCE_SEQUENTIAL);
op->remove(PREF_INPUT_FILE);
op->remove(PREF_INDEX_OUT);
op->remove(PREF_SELECT_FILE);
if(
#ifdef ENABLE_XML_RPC
!op->getAsBool(PREF_ENABLE_XML_RPC) &&