summaryrefslogtreecommitdiffstats
path: root/api/logic/modplatform
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2018-03-29 20:55:47 +0200
committerPetr Mrázek <peterix@gmail.com>2018-03-29 20:55:47 +0200
commitc9832d0d8603ba2420a093f44cb5037e18e938f6 (patch)
tree47b1a44d82e115eb361b00acf814264f6a09dc89 /api/logic/modplatform
parentfa8f19b0460234223f6af9c73d6d49727c838703 (diff)
downloadMultiMC-c9832d0d8603ba2420a093f44cb5037e18e938f6.tar
MultiMC-c9832d0d8603ba2420a093f44cb5037e18e938f6.tar.gz
MultiMC-c9832d0d8603ba2420a093f44cb5037e18e938f6.tar.lz
MultiMC-c9832d0d8603ba2420a093f44cb5037e18e938f6.tar.xz
MultiMC-c9832d0d8603ba2420a093f44cb5037e18e938f6.zip
GH-2208 fix FTB pack download caching
Diffstat (limited to 'api/logic/modplatform')
-rw-r--r--api/logic/modplatform/ftb/FtbPackInstallTask.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/api/logic/modplatform/ftb/FtbPackInstallTask.cpp b/api/logic/modplatform/ftb/FtbPackInstallTask.cpp
index e3bb2340..b57c2092 100644
--- a/api/logic/modplatform/ftb/FtbPackInstallTask.cpp
+++ b/api/logic/modplatform/ftb/FtbPackInstallTask.cpp
@@ -24,11 +24,12 @@ void FtbPackInstallTask::downloadPack()
{
setStatus(tr("Downloading zip for %1").arg(m_pack.name));
- auto entry = ENV.metacache()->resolveEntry("general", "FTBPacks/" + m_pack.name);
- NetJob *job = new NetJob("Downlad FTB Pack");
+ auto packoffset = QString("%1/%2/%3").arg(m_pack.dir, m_version.replace(".", "_"), m_pack.file);
+ auto entry = ENV.metacache()->resolveEntry("FTBPacks", packoffset);
+ NetJob *job = new NetJob("Download FTB Pack");
entry->setStale(true);
- QString url = QString("http://ftb.cursecdn.com/FTB2/modpacks/%1/%2/%3").arg(m_pack.dir, m_version.replace(".", "_"), m_pack.file);
+ QString url = QString("http://ftb.cursecdn.com/FTB2/modpacks/%1").arg(packoffset);
job->addNetAction(Net::Download::makeCached(url, entry));
archivePath = entry->getFullPath();