Ignore --out option supplied in command-line if -i is used.

You can still use out option in the text file specified in -i.
pull/2/head
Tatsuhiro Tsujikawa 2011-08-18 18:36:17 +09:00
parent bf42505b7b
commit 4c1c38a33f
2 changed files with 3 additions and 2 deletions

View File

@ -517,6 +517,7 @@ void createRequestGroupForUriList
}
SharedHandle<Option> requestOption(new Option(*option.get()));
requestOption->remove(PREF_OUT);
for(std::set<std::string>::const_iterator i =
listRequestOptions().begin(), eoi = listRequestOptions().end();
i != eoi; ++i) {

View File

@ -302,8 +302,8 @@ void DownloadHelperTest::testCreateRequestGroupForUriList()
SharedHandle<RequestGroup> fileISOGroup = result[1];
SharedHandle<DownloadContext> fileISOCtx = fileISOGroup->getDownloadContext();
CPPUNIT_ASSERT_EQUAL(std::string("/tmp/file.out"),
fileISOCtx->getBasePath());
// PREF_OUT in option_ must be ignored.
CPPUNIT_ASSERT_EQUAL(std::string(), fileISOCtx->getBasePath());
}
#ifdef ENABLE_BITTORRENT