GH-1856 Make MultiMC fail hard when things are missing

Things like:
* jar mods
* valid version files
This commit is contained in:
Petr Mrázek
2017-04-23 02:31:13 +02:00
parent b414bbe395
commit 3f24c4cfe5
12 changed files with 57 additions and 98 deletions

View File

@ -279,6 +279,14 @@ bool MMCZip::createModdedJar(QString sourceJarPath, QString targetJarPath, const
qDebug() << "Adding folder " << filename.fileName() << " from "
<< filename.absoluteFilePath();
}
else
{
// Make sure we do not continue launching when something is missing or undefined...
zipOut.close();
QFile::remove(targetJarPath);
qCritical() << "Failed to add unknown mod type" << mod.filename().fileName() << "to the jar.";
return false;
}
}
if (!mergeZipFiles(&zipOut, QFileInfo(sourceJarPath), addedFiles, metaInfFilter))