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 committed 2017-04-23 02:34:16 +02:00
1 parent b414bbe395
commit 3f24c4cfe5
12 files changed
+57 -98

No files matched your search

+8
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))