diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2016-04-23 19:29:01 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2016-04-23 19:29:01 +0900 |
| commit | 3c637fa3d5436c6e6fd7115dc08d69844b15358f (patch) | |
| tree | f3354208926b318039f9ea0914a6093b78c0b4ad | |
| parent | 1ce6ac0b238b653d9b49a1c9f913d08db2b74c69 (diff) | |
Fix downloaded metaurl torrent filename
| -rw-r--r-- | src/Metalink2RequestGroup.cc | 1 | ||||
| -rw-r--r-- | src/RequestGroup.cc | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/Metalink2RequestGroup.cc b/src/Metalink2RequestGroup.cc index 4a856bb0..a160c116 100644 --- a/src/Metalink2RequestGroup.cc +++ b/src/Metalink2RequestGroup.cc @@ -228,6 +228,7 @@ void Metalink2RequestGroup::createRequestGroup( // make it in-memory download torrentRg->addPreDownloadHandler( download_handlers::getMemoryPreDownloadHandler()); + torrentRg->markInMemoryDownload(); groups.push_back(torrentRg); } } diff --git a/src/RequestGroup.cc b/src/RequestGroup.cc index cf436650..85b75a45 100644 --- a/src/RequestGroup.cc +++ b/src/RequestGroup.cc @@ -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)) { |
