summaryrefslogtreecommitdiff
path: root/src/BtDependency.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-12-03 13:08:22 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-12-03 13:08:22 +0900
commit0a2b1660fa282da899cba35f7105b9d424f915ca (patch)
tree5283e683278fac7660204bf3619ff6dc53a2183d /src/BtDependency.cc
parent479f71efaffb8cbed3c4c22ad6e7b02869e8784f (diff)
Removed DownloadContext::dir_. Use PREF_DIR value instead.
Diffstat (limited to 'src/BtDependency.cc')
-rw-r--r--src/BtDependency.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/BtDependency.cc b/src/BtDependency.cc
index 0c9649b5..7a5f8569 100644
--- a/src/BtDependency.cc
+++ b/src/BtDependency.cc
@@ -81,7 +81,6 @@ bool BtDependency::resolve()
// cut reference here
dependee_.reset();
SharedHandle<DownloadContext> context(new DownloadContext());
- context->setDir(dependant_->getDownloadContext()->getDir());
try {
SharedHandle<DiskAdaptor> diskAdaptor =
dependee->getPieceStorage()->getDiskAdaptor();
@@ -91,12 +90,14 @@ bool BtDependency::resolve()
SharedHandle<TorrentAttribute> attrs =
bittorrent::getTorrentAttrs(dependee->getDownloadContext());
bittorrent::loadFromMemory
- (bittorrent::metadata2Torrent(content, attrs), context, "default");
+ (bittorrent::metadata2Torrent(content, attrs), context,
+ dependant_->getOption(), "default");
// We don't call bittorrent::adjustAnnounceUri() because it
// has already been called with attrs.
} else {
bittorrent::loadFromMemory
- (content, context, File(dependee->getFirstFilePath()).getBasename());
+ (content, context, dependant_->getOption(),
+ File(dependee->getFirstFilePath()).getBasename());
bittorrent::adjustAnnounceUri(bittorrent::getTorrentAttrs(context),
dependant_->getOption());
}