aboutsummaryrefslogtreecommitdiff
path: root/launcher/InstanceImportTask.cpp
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-12-01 15:15:15 -0300
committerflow <flowlnlnln@gmail.com>2022-12-01 15:15:15 -0300
commita116778402bd98ee079488d8c5a27933369e9046 (patch)
tree8a1e7840e254f48cd1125c82be9ac7980f1eaa0e /launcher/InstanceImportTask.cpp
parent9e1653ebb471d4d96efda85cbde128c59fe3686a (diff)
downloadPrismLauncher-a116778402bd98ee079488d8c5a27933369e9046.tar.gz
PrismLauncher-a116778402bd98ee079488d8c5a27933369e9046.tar.bz2
PrismLauncher-a116778402bd98ee079488d8c5a27933369e9046.zip
fix(Inst.Import): don't search inside 'overrides/' for the manifest
It will never be there anyways, and saves a **bunch** of time when the overrides folder is big and we traverse all the tree when searching for the MMC 'instance.cfg' file. Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher/InstanceImportTask.cpp')
-rw-r--r--launcher/InstanceImportTask.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/launcher/InstanceImportTask.cpp b/launcher/InstanceImportTask.cpp
index b490620d..5f459649 100644
--- a/launcher/InstanceImportTask.cpp
+++ b/launcher/InstanceImportTask.cpp
@@ -164,18 +164,14 @@ void InstanceImportTask::processZipPack()
}
else
{
- QString mmcRoot = MMCZip::findFolderOfFileInZip(m_packZip.get(), "instance.cfg");
- QString flameRoot = MMCZip::findFolderOfFileInZip(m_packZip.get(), "manifest.json");
+ QStringList paths_to_ignore { "overrides/" };
- if (!mmcRoot.isNull())
- {
+ if (QString mmcRoot = MMCZip::findFolderOfFileInZip(m_packZip.get(), "instance.cfg", paths_to_ignore); !mmcRoot.isNull()) {
// process as MultiMC instance/pack
qDebug() << "MultiMC:" << mmcRoot;
root = mmcRoot;
m_modpackType = ModpackType::MultiMC;
- }
- else if(!flameRoot.isNull())
- {
+ } else if (QString flameRoot = MMCZip::findFolderOfFileInZip(m_packZip.get(), "manifest.json", paths_to_ignore); !flameRoot.isNull()) {
// process as Flame pack
qDebug() << "Flame:" << flameRoot;
root = flameRoot;