Fix downloaded metaurl torrent filename

This commit is contained in:
Tatsuhiro Tsujikawa 2016-04-23 19:29:01 +09:00
parent 1ce6ac0b23
commit 3c637fa3d5
2 changed files with 4 additions and 1 deletions

View File

@ -228,6 +228,7 @@ void Metalink2RequestGroup::createRequestGroup(
// make it in-memory download
torrentRg->addPreDownloadHandler(
download_handlers::getMemoryPreDownloadHandler());
torrentRg->markInMemoryDownload();
groups.push_back(torrentRg);
}
}

View File

@ -1148,7 +1148,9 @@ std::shared_ptr<DownloadResult> RequestGroup::createDownloadResult() const
void RequestGroup::reportDownloadFinished()
{
A2_LOG_NOTICE(fmt(MSG_FILE_DOWNLOAD_COMPLETED,
downloadContext_->getBasePath().c_str()));
inMemoryDownload()
? getFirstFilePath().c_str()
: downloadContext_->getBasePath().c_str()));
uriSelector_->resetCounters();
#ifdef ENABLE_BITTORRENT
if (downloadContext_->hasAttribute(CTX_ATTR_BT)) {