Read mcmod.info first, forgeversion.properties second
This commit is contained in:
parent
4186623d0d
commit
605423b8e4
@ -56,34 +56,34 @@ void Mod::repath(const QFileInfo &file)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
QuaZipFile file(&zip);
|
QuaZipFile file(&zip);
|
||||||
for (bool more = zip.goToFirstFile(); more; more = zip.goToNextFile())
|
|
||||||
|
if (zip.setCurrentFile("mcmod.info"))
|
||||||
{
|
{
|
||||||
QString name = zip.getCurrentFileName();
|
if(!file.open(QIODevice::ReadOnly))
|
||||||
if (name == "mcmod.info")
|
|
||||||
{
|
|
||||||
if (!file.open(QIODevice::ReadOnly))
|
|
||||||
{
|
{
|
||||||
zip.close();
|
zip.close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReadMCModInfo(file.readAll());
|
ReadMCModInfo(file.readAll());
|
||||||
file.close();
|
file.close();
|
||||||
zip.close();
|
zip.close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (name == "forgeversion.properties")
|
else if (zip.setCurrentFile("forgeversion.properties"))
|
||||||
{
|
{
|
||||||
if (!file.open(QIODevice::ReadOnly))
|
if (!file.open(QIODevice::ReadOnly))
|
||||||
{
|
{
|
||||||
zip.close();
|
zip.close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReadForgeInfo(file.readAll());
|
ReadForgeInfo(file.readAll());
|
||||||
file.close();
|
file.close();
|
||||||
zip.close();
|
zip.close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
zip.close();
|
zip.close();
|
||||||
}
|
}
|
||||||
else if (m_type == MOD_FOLDER)
|
else if (m_type == MOD_FOLDER)
|
||||||
|
Loading…
Reference in New Issue
Block a user