From 5ac4e73697696c2ea00b72b55cac5138c67a9b55 Mon Sep 17 00:00:00 2001 From: flow Date: Sun, 21 Aug 2022 13:06:18 -0300 Subject: fix: make libraries cache eternal This restores the behavior prior to PR #920. Signed-off-by: flow --- launcher/minecraft/Library.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'launcher/minecraft') diff --git a/launcher/minecraft/Library.cpp b/launcher/minecraft/Library.cpp index c7982705..ba7aed4b 100644 --- a/launcher/minecraft/Library.cpp +++ b/launcher/minecraft/Library.cpp @@ -88,6 +88,9 @@ QList Library::getDownloads( options |= Net::Download::Option::AcceptLocalFiles; } + // Don't add a time limit for the libraries cache entry validity + options |= Net::Download::Option::MakeEternal; + if(sha1.size()) { auto rawSha1 = QByteArray::fromHex(sha1.toLatin1()); -- cgit From ddf1e1cceea904e7a69ac62c2b281944888e4bb2 Mon Sep 17 00:00:00 2001 From: flow Date: Sun, 21 Aug 2022 13:18:04 -0300 Subject: fix: make FML libraries cache eternal Signed-off-by: flow --- launcher/minecraft/update/FMLLibrariesTask.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'launcher/minecraft') diff --git a/launcher/minecraft/update/FMLLibrariesTask.cpp b/launcher/minecraft/update/FMLLibrariesTask.cpp index b6238ce9..7a0bd2f3 100644 --- a/launcher/minecraft/update/FMLLibrariesTask.cpp +++ b/launcher/minecraft/update/FMLLibrariesTask.cpp @@ -63,11 +63,12 @@ void FMLLibrariesTask::executeTask() setStatus(tr("Downloading FML libraries...")); auto dljob = new NetJob("FML libraries", APPLICATION->network()); auto metacache = APPLICATION->metacache(); + Net::Download::Options options = Net::Download::Option::MakeEternal; for (auto &lib : fmlLibsToProcess) { auto entry = metacache->resolveEntry("fmllibs", lib.filename); QString urlString = BuildConfig.FMLLIBS_BASE_URL + lib.filename; - dljob->addNetAction(Net::Download::makeCached(QUrl(urlString), entry)); + dljob->addNetAction(Net::Download::makeCached(QUrl(urlString), entry, options)); } connect(dljob, &NetJob::succeeded, this, &FMLLibrariesTask::fmllibsFinished); -- cgit