fix(quilt) always prefer qmj over fmj

this fixes Quilt-only mods like ok zoomer showing wrong metadata
This commit is contained in:
DioEgizio 2022-05-18 14:33:58 +02:00 committed by GitHub
parent cc13310083
commit 127dfadc6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -430,19 +430,6 @@ void LocalModParseTask::processAsZip()
zip.close(); zip.close();
return; return;
} }
else if (zip.setCurrentFile("fabric.mod.json"))
{
if (!file.open(QIODevice::ReadOnly))
{
zip.close();
return;
}
m_result->details = ReadFabricModInfo(file.readAll());
file.close();
zip.close();
return;
}
else if (zip.setCurrentFile("quilt.mod.json")) else if (zip.setCurrentFile("quilt.mod.json"))
{ {
if (!file.open(QIODevice::ReadOnly)) if (!file.open(QIODevice::ReadOnly))
@ -456,6 +443,19 @@ void LocalModParseTask::processAsZip()
zip.close(); zip.close();
return; return;
} }
else if (zip.setCurrentFile("fabric.mod.json"))
{
if (!file.open(QIODevice::ReadOnly))
{
zip.close();
return;
}
m_result->details = ReadFabricModInfo(file.readAll());
file.close();
zip.close();
return;
}
else if (zip.setCurrentFile("forgeversion.properties")) else if (zip.setCurrentFile("forgeversion.properties"))
{ {
if (!file.open(QIODevice::ReadOnly)) if (!file.open(QIODevice::ReadOnly))